org.productivity.java.habitat4j.crypto.decryptor.examples
Class PropertyCryptTool

java.lang.Object
  extended by org.productivity.java.habitat4j.crypto.decryptor.StaticCrypto
      extended by org.productivity.java.habitat4j.crypto.decryptor.generic.GenericCrypto
          extended by org.productivity.java.habitat4j.crypto.decryptor.examples.PropertyCryptTool

public class PropertyCryptTool
extends GenericCrypto


Field Summary
 
Fields inherited from class org.productivity.java.habitat4j.crypto.decryptor.generic.GenericCrypto
config, keyInfo
 
Constructor Summary
PropertyCryptTool()
           
 
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 org.productivity.java.habitat4j.crypto.decryptor.generic.GenericCrypto
createHash, createString, decrypt, getBytes, getKeyReader, initialize, xcrypt
 
Methods inherited from class org.productivity.java.habitat4j.crypto.decryptor.StaticCrypto
createString, decode, encode, findPadEndIndex, getBytes, pad, removePad
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyCryptTool

public PropertyCryptTool()
Method Detail

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