Class AES256Options

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) static java.lang.String ALGORITHM  
      private javax.crypto.Cipher cipher  
      private byte[] iv  
      private int numCyclesPower  
      private byte[] salt  
      (package private) static java.lang.String TRANSFORMATION  
    • Constructor Summary

      Constructors 
      Constructor Description
      AES256Options​(char[] password)  
      AES256Options​(char[] password, byte[] salt, byte[] iv, int numCyclesPower)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) javax.crypto.Cipher getCipher()  
      (package private) byte[] getIv()  
      (package private) int getNumCyclesPower()  
      (package private) byte[] getSalt()  
      (package private) static javax.crypto.spec.SecretKeySpec newSecretKeySpec​(byte[] bytes)  
      private static byte[] randomBytes​(int size)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • salt

        private final byte[] salt
      • iv

        private final byte[] iv
      • numCyclesPower

        private final int numCyclesPower
      • cipher

        private final javax.crypto.Cipher cipher
    • Constructor Detail

      • AES256Options

        public AES256Options​(char[] password)
        Parameters:
        password - password used for encryption
      • AES256Options

        public AES256Options​(char[] password,
                             byte[] salt,
                             byte[] iv,
                             int numCyclesPower)
        Parameters:
        password - password used for encryption
        salt - for password hash salting (enforce password security)
        iv - Initialization Vector (IV) used by cipher algorithm
        numCyclesPower - another password security enforcer parameter that controls the cycles of password hashing. More the this number is high, more security you'll have but also high CPU usage
    • Method Detail

      • newSecretKeySpec

        static javax.crypto.spec.SecretKeySpec newSecretKeySpec​(byte[] bytes)
      • randomBytes

        private static byte[] randomBytes​(int size)
      • getCipher

        javax.crypto.Cipher getCipher()
      • getIv

        byte[] getIv()
      • getNumCyclesPower

        int getNumCyclesPower()
      • getSalt

        byte[] getSalt()