Class SunJceCrypt

  • All Implemented Interfaces:
    ICrypt

    public class SunJceCrypt
    extends AbstractCrypt
    Provide some simple means to encrypt and decrypt strings such as passwords. The whole implementation is based around Sun's security providers and uses the PBEWithMD5AndDES method to encrypt and decrypt the data.
    Author:
    Juergen Donnerstag
    • Field Detail

      • DEFAULT_CRYPT_METHOD

        public static final String DEFAULT_CRYPT_METHOD
        Name of the default encryption method
        See Also:
        Constant Field Values
      • SALT

        public static final byte[] SALT
        Salt
    • Constructor Detail

      • SunJceCrypt

        public SunJceCrypt()
        Constructor
      • SunJceCrypt

        public SunJceCrypt​(String cryptMethod)
        Constructor that uses a custom encryption method (cipher). You may need to override createKeySpec() and/or createParameterSpec() for the custom cipher.
        Parameters:
        cryptMethod - the name of encryption method (the cipher)