public DefaultEntry(String type, String description, String value) { this.type = type; this.description = description; this.value = new SecureString(value); }
@Override protected SecureString loadValue(String value) { return new SecureString(value); }
public CfgSecure(Object owner, String path, String def) { this(owner,path,def == null ? null : new SecureString(def)); }
public CAddress(String currency, String addr, String privKey) { this.address = addr; this.privKey = new SecureString(privKey); this.currency = currency.trim().toUpperCase(); }
public FolderVaultSource(File folder, String passphrase) throws IOException { this.passphrase = new SecureString(passphrase); this.folder = folder; if (folder.exists()) doLoad(); else folder.mkdirs(); }
public CAddress(CCurrency currency, String addr, String privKey) { this.address = addr; this.privKey = new SecureString(privKey); this.currency = currency.toString(); }
public FileVaultSource(File file, String passphrase) throws IOException { this.passphrase = new SecureString(passphrase); this.file = file; if (file.exists()) doLoad(); }
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); } } } }
public static SecureString create(String pubKey, String secret) { if (MString.isSet(pubKey)) return new CryptedString(pubKey, secret); return new SecureString(secret); }
default String importSecret(String groupName, String secret) throws MException { return importSecret(groupName, null, null, new SecretContent(new SecureString(secret), new MProperties()), new MProperties()); }
default void importUpdate(String secretId, String secret) throws MException { importUpdate(secretId, null, null, new SecretContent(new SecureString(secret), new MProperties()), new MProperties()); }
type = MVault.TYPE_TEXT; value = new SecureString(block.toString());
@Override protected SecureString loadValue() { int p = getPath().indexOf('@'); if (p < 0) return new SecureString(MApi.getCfg(getOwner()).getString(getPath(), strValueOf(getDefault()))); ResourceNode<?> node = MApi.getCfg(getOwner()).getNodeByPath(getPath().substring(0, p)); if (node == null) return getDefault(); return new SecureString(node.getString(getPath().substring(p+1), strValueOf(getDefault()))); }