Class PBECipher


  • public class PBECipher
    extends java.lang.Object
    Version:
    $Id$
    • Constructor Summary

      Constructors 
      Constructor Description
      PBECipher()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private javax.crypto.Cipher createCipher​(byte[] pwdAsBytes, byte[] salt, int mode)  
      java.lang.String decrypt64​(java.lang.String encryptedText, java.lang.String password)  
      java.lang.String encrypt64​(java.lang.String clearText, java.lang.String password)  
      private byte[] getSalt​(int sz)  
      • Methods inherited from class java.lang.Object

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

      • STRING_ENCODING

        protected static final java.lang.String STRING_ENCODING
        See Also:
        Constant Field Values
      • PBE_ITERATIONS

        protected static int PBE_ITERATIONS
      • _digester

        protected java.security.MessageDigest _digester
      • _secureRandom

        private static final java.security.SecureRandom _secureRandom
    • Method Detail

      • getSalt

        private byte[] getSalt​(int sz)
      • createCipher

        private javax.crypto.Cipher createCipher​(byte[] pwdAsBytes,
                                                 byte[] salt,
                                                 int mode)
                                          throws java.security.NoSuchAlgorithmException,
                                                 javax.crypto.NoSuchPaddingException,
                                                 java.security.InvalidKeyException,
                                                 java.security.InvalidAlgorithmParameterException
        Throws:
        java.security.NoSuchAlgorithmException
        javax.crypto.NoSuchPaddingException
        java.security.InvalidKeyException
        java.security.InvalidAlgorithmParameterException