Tabnine Logo
SecureString
Code IndexAdd Tabnine to your IDE (free)

How to use
SecureString
in
de.mhus.lib.core.util

Best Java code snippets using de.mhus.lib.core.util.SecureString (Showing top 20 results out of 315)

origin: de.mhus.lib/mhu-lib-core

public DefaultEntry(String type, String description, String value) {
  this.type = type;
  this.description = description;
  this.value = new SecureString(value);
}

origin: de.mhus.lib/mhu-lib-core

private String strValueOf(SecureString def) {
  if (def == null) return null;
  return def.value();
}
origin: de.mhus.lib/mhu-lib-core

public static String encode(METHOD method, SecureString in, SecureString secret) {
  return encode(method, in.value(), secret.value());
}
 
origin: de.mhus.lib/mhu-lib-core

@Override
protected SecureString loadValue(String value) {
  return new SecureString(value);
}
origin: de.mhus.lib/mhu-lib-core

public static String value(SecureString string, KeyPair key) {
  if (string == null) return null;
  if (!(string instanceof CryptedString))
    return string.value();
  return ((CryptedString)string).value(key);
}

origin: de.mhus.lib/mhu-lib-core

public CfgSecure(Object owner, String path, String def) {
  this(owner,path,def == null ? null : new SecureString(def));
}

origin: de.mhus.lib/mhu-lib-core

public String valueAsString() {
  SecureString v = value();
  return v == null ? null : v.value();
}
origin: de.mhus.lib/mhu-lib-core

public CAddress(String currency, String addr, String privKey) {
  this.address = addr;
  this.privKey = new SecureString(privKey);
  this.currency = currency.trim().toUpperCase();
}
origin: de.mhus.lib/mhu-lib-core

public static String encode(METHOD method, SecureString in, String secret) {
  return encode(method, in.value(), secret);
}
origin: de.mhus.lib/mhu-lib-core

public CAddress(CCurrency currency, String addr, String privKey) {
  this.address = addr;
  this.privKey = new SecureString(privKey);
  this.currency = currency.toString();
}

origin: de.mhus.osgi/mhu-osgi-crypt-api

default PemBlock sign(PemPriv key, String text, SecureString passphrase) throws MException {
  return sign(key, text, passphrase == null ? null : passphrase.value());
}
origin: de.mhus.lib/mhu-lib-core

public FolderVaultSource(File folder, String passphrase) throws IOException {
  this.passphrase = new SecureString(passphrase);
  this.folder = folder;
  if (folder.exists())
    doLoad();
  else
    folder.mkdirs();
}

origin: de.mhus.lib/mhu-lib-core

public static String encode(METHOD method, String in, SecureString secret) {
  return encode(method, in, secret.value());
}
 
origin: de.mhus.lib/mhu-lib-core

public FileVaultSource(File file, String passphrase) throws IOException {
  this.passphrase = new SecureString(passphrase);
  this.file = file;
  if (file.exists())
    doLoad();
}

origin: de.mhus.osgi/mhu-osgi-crypt-api

default String decrypt(PemPriv key, PemBlock encoded, SecureString passphrase) throws MException {
  return decrypt(key, encoded, passphrase == null ? null : passphrase.value());
};

origin: de.mhus.lib/mhu-lib-core

public FileEntry(int version, ObjectInputStream ois) throws IOException {
  
  if (version == 0) {
    id = UUID.fromString(ois.readUTF());
    type = ois.readUTF();
    description = ois.readUTF();
    value = new SecureString(ois.readUTF());
  } else
  if (version > 0) {
    int v = ois.readInt();
    if (v == 1) {
      id = UUID.fromString(ois.readUTF());
      type = ois.readUTF();
      description = ois.readUTF();
      try {
        value = (SecureString)ois.readObject();
      } catch (ClassNotFoundException e) {
        throw new IOException(e);
      }
    }
  }
}
origin: de.mhus.lib/mhu-lib-core

protected void saveEntry(VaultEntry entry) throws IOException {
  File file = new File(folder,entry.getId().toString());
  FileOutputStream parent = new FileOutputStream(file);
  OutputStream os = MCrypt.createCipherOutputStream(parent, passphrase.value());
  ObjectOutputStream oos = new ObjectOutputStream(os);
  oos.writeInt(version);
  oos.writeUTF(entry.getId().toString());
  oos.writeUTF(entry.getType());
  oos.writeUTF(entry.getDescription());
  oos.writeObject(entry.getValue());
  oos.flush();
  parent.close();
}
origin: de.mhus.lib/mhu-lib-core

public static SecureString create(String pubKey, String secret) {
  if (MString.isSet(pubKey))
    return new CryptedString(pubKey, secret);
  return new SecureString(secret);
}

origin: de.mhus.lib/mhu-lib-core

@Override
public void doSave() throws IOException {
  FileOutputStream parent = new FileOutputStream(file);
  OutputStream os = MCrypt.createCipherOutputStream(parent, passphrase.value());
  ObjectOutputStream oos = new ObjectOutputStream(os);
  oos.writeInt(1); // version
  oos.writeUTF(name);
  oos.writeInt(entries.size());
  for (VaultEntry entry : entries.values()) {
    oos.writeUTF(entry.getId().toString());
    oos.writeUTF(entry.getType());
    oos.writeUTF(entry.getDescription());
    oos.writeObject(entry.getValue());
  }
  oos.flush();
  parent.close();
}

origin: de.mhus.cherry.vault/vault-api

default String importSecret(String groupName, String secret) throws MException {
  return importSecret(groupName, null, null, new SecretContent(new SecureString(secret), new MProperties()), new MProperties());
}

de.mhus.lib.core.utilSecureString

Most used methods

  • <init>
  • value

Popular in Java

  • Reactive rest calls using spring rest template
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • compareTo (BigDecimal)
  • requestLocationUpdates (LocationManager)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • ImageIO (javax.imageio)
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now