Package com.appslandia.common.crypto
Class SecureProps
- java.lang.Object
-
- java.util.Dictionary<K,V>
-
- java.util.Hashtable<java.lang.Object,java.lang.Object>
-
- java.util.Properties
-
- com.appslandia.common.crypto.SecureProps
-
- All Implemented Interfaces:
Config,java.io.Serializable,java.lang.Cloneable,java.util.Map<java.lang.Object,java.lang.Object>
public class SecureProps extends java.util.Properties implements Config
- Author:
- Loc Ha
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SecureProps(char[] password)SecureProps(Encryptor encryptor)SecureProps(TextEncryptor textEncryptor)SecureProps(java.lang.String password)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SecurePropscopy()SecurePropsenc(java.lang.String key, boolean value)SecurePropsenc(java.lang.String key, double value)SecurePropsenc(java.lang.String key, float value)SecurePropsenc(java.lang.String key, int value)SecurePropsenc(java.lang.String key, long value)SecurePropsenc(java.lang.String key, java.lang.String value)java.lang.Stringget(java.lang.Object key)java.lang.StringgetString(java.lang.String key)java.lang.Objectput(java.lang.Object key, java.lang.Object value)SecurePropsset(java.lang.String key, boolean value)SecurePropsset(java.lang.String key, double value)SecurePropsset(java.lang.String key, int value)SecurePropsset(java.lang.String key, long value)SecurePropsset(java.lang.String key, java.lang.String value)voidstore(java.io.File file, java.lang.String comments)voidstore(java.io.OutputStream os, java.lang.String comments)voidstore(java.io.Writer w, java.lang.String comments)voidstore(java.lang.String file, java.lang.String comments)protected java.util.PropertiestoProperties()java.lang.StringtoString()-
Methods inherited from class java.util.Properties
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, getOrDefault, getProperty, getProperty, hashCode, isEmpty, keys, keySet, list, list, load, load, loadFromXML, merge, propertyNames, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, save, setProperty, size, storeToXML, storeToXML, storeToXML, stringPropertyNames, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.appslandia.common.base.Config
getBool, getDouble, getFormatted, getFormatted, getFormatted, getInt, getLong, getRequiredBool, getRequiredDouble, getRequiredFormatted, getRequiredFormatted, getRequiredFormatted, getRequiredInt, getRequiredLong, getRequiredString, getString, getStringArray
-
-
-
-
Constructor Detail
-
SecureProps
public SecureProps(char[] password)
-
SecureProps
public SecureProps(java.lang.String password)
-
SecureProps
public SecureProps(Encryptor encryptor)
-
SecureProps
public SecureProps(TextEncryptor textEncryptor)
-
-
Method Detail
-
getString
public java.lang.String getString(java.lang.String key)
-
put
public java.lang.Object put(java.lang.Object key, java.lang.Object value)- Specified by:
putin interfacejava.util.Map<java.lang.Object,java.lang.Object>- Overrides:
putin classjava.util.Properties
-
get
public java.lang.String get(java.lang.Object key)
- Specified by:
getin interfacejava.util.Map<java.lang.Object,java.lang.Object>- Overrides:
getin classjava.util.Properties
-
set
public SecureProps set(java.lang.String key, java.lang.String value)
-
set
public SecureProps set(java.lang.String key, boolean value)
-
set
public SecureProps set(java.lang.String key, int value)
-
set
public SecureProps set(java.lang.String key, long value)
-
set
public SecureProps set(java.lang.String key, double value)
-
enc
public SecureProps enc(java.lang.String key, java.lang.String value) throws CryptoException
- Throws:
CryptoException
-
enc
public SecureProps enc(java.lang.String key, boolean value) throws CryptoException
- Throws:
CryptoException
-
enc
public SecureProps enc(java.lang.String key, int value) throws CryptoException
- Throws:
CryptoException
-
enc
public SecureProps enc(java.lang.String key, long value) throws CryptoException
- Throws:
CryptoException
-
enc
public SecureProps enc(java.lang.String key, float value) throws CryptoException
- Throws:
CryptoException
-
enc
public SecureProps enc(java.lang.String key, double value) throws CryptoException
- Throws:
CryptoException
-
store
public void store(java.io.File file, java.lang.String comments) throws java.io.IOException- Throws:
java.io.IOException
-
store
public void store(java.lang.String file, java.lang.String comments) throws java.io.IOException- Throws:
java.io.IOException
-
store
public void store(java.io.OutputStream os, java.lang.String comments) throws java.io.IOException- Overrides:
storein classjava.util.Properties- Throws:
java.io.IOException
-
store
public void store(java.io.Writer w, java.lang.String comments) throws java.io.IOException- Overrides:
storein classjava.util.Properties- Throws:
java.io.IOException
-
toProperties
protected java.util.Properties toProperties()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.util.Properties
-
copy
public SecureProps copy()
-
-