org.productivity.java.habitat4j.crypto.decryptor.examples
Class PropertyCryptTool
java.lang.Object
org.productivity.java.habitat4j.crypto.decryptor.StaticCrypto
org.productivity.java.habitat4j.crypto.decryptor.generic.GenericCrypto
org.productivity.java.habitat4j.crypto.decryptor.examples.PropertyCryptTool
public class PropertyCryptTool
- extends GenericCrypto
|
Method Summary |
protected static java.lang.String |
addHash(java.lang.String list,
java.lang.String name,
java.lang.String plainValue,
java.lang.String encryptedValue,
java.lang.String encryptedValueKey)
|
protected static byte[] |
encrypt(KeyInfoIF keyInfo,
byte[] value)
|
protected static java.lang.String |
encrypt(KeyInfoIF keyInfo,
java.lang.String value)
|
protected static byte[] |
generateRandomData(int sizeInBits)
|
static java.security.SecureRandom |
getSecureRandom()
|
static void |
main(java.lang.String[] args)
|
protected static void |
usage()
|
protected static boolean |
validate(KeyInfoIF keyInfo,
byte[] plain,
byte[] crypt)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PropertyCryptTool
public PropertyCryptTool()
getSecureRandom
public static java.security.SecureRandom getSecureRandom()
throws java.security.NoSuchAlgorithmException
- Throws:
java.security.NoSuchAlgorithmException
generateRandomData
protected static byte[] generateRandomData(int sizeInBits)
throws java.security.NoSuchAlgorithmException
- Throws:
java.security.NoSuchAlgorithmException
addHash
protected static java.lang.String addHash(java.lang.String list,
java.lang.String name,
java.lang.String plainValue,
java.lang.String encryptedValue,
java.lang.String encryptedValueKey)
throws java.lang.Exception
- Throws:
java.lang.Exception
validate
protected static boolean validate(KeyInfoIF keyInfo,
byte[] plain,
byte[] crypt)
throws java.lang.Exception
- Throws:
java.lang.Exception
encrypt
protected static byte[] encrypt(KeyInfoIF keyInfo,
byte[] value)
throws java.lang.Exception
- Throws:
java.lang.Exception
encrypt
protected static java.lang.String encrypt(KeyInfoIF keyInfo,
java.lang.String value)
throws java.lang.Exception
- Throws:
java.lang.Exception
usage
protected static void usage()
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Throws:
java.lang.Exception