Class JCEEncryptor

  • All Implemented Interfaces:
    Securable, Securable

    public final class JCEEncryptor
    extends java.lang.Object
    implements Securable
    EclipseLink reference implementation for password encryption.
    Author:
    Guy Pelletier
    • Constructor Summary

      Constructors 
      Constructor Description
      JCEEncryptor()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String decryptPassword​(java.lang.String encryptedPswd)
      Decrypts a string.
      java.lang.String encryptPassword​(java.lang.String password)
      Encrypts a string.
      java.lang.String getSessionName()  
      void setSessionName​(java.lang.String sessionName)  
      • Methods inherited from class java.lang.Object

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

      • JCEEncryptor

        public JCEEncryptor()
                     throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • encryptPassword

        public java.lang.String encryptPassword​(java.lang.String password)
        Encrypts a string. Will throw a validation exception.
        Specified by:
        encryptPassword in interface Securable
        Specified by:
        encryptPassword in interface Securable
      • decryptPassword

        public java.lang.String decryptPassword​(java.lang.String encryptedPswd)
        Decrypts a string. Will throw a validation exception. Handles backwards compatibility for older encrypted strings.
        Specified by:
        decryptPassword in interface Securable
        Specified by:
        decryptPassword in interface Securable
      • getSessionName

        public java.lang.String getSessionName()
      • setSessionName

        public void setSessionName​(java.lang.String sessionName)