Class BaseStringCipherExecutor

    • Field Summary

      • Fields inherited from interface org.apereo.cas.util.crypto.CipherExecutor

        DEFAULT_CONTENT_ENCRYPTION_ALGORITHM, DEFAULT_STRINGABLE_ENCRYPTION_KEY_SIZE, DEFAULT_STRINGABLE_SIGNING_KEY_SIZE
      • Fields inherited from interface org.apereo.cas.util.crypto.DecodableCipher

        LOGGER
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected BaseStringCipherExecutor​(java.lang.String secretKeyEncryption, java.lang.String secretKeySigning, boolean encryptionEnabled, boolean signingEnabled, int signingKeySize, int encryptionKeySize)  
      protected BaseStringCipherExecutor​(java.lang.String secretKeyEncryption, java.lang.String secretKeySigning, boolean encryptionEnabled, int signingKeySize, int encryptionKeySize)  
      protected BaseStringCipherExecutor​(java.lang.String secretKeyEncryption, java.lang.String secretKeySigning, int signingKeySize, int encryptionKeySize)  
      protected BaseStringCipherExecutor​(java.lang.String secretKeyEncryption, java.lang.String secretKeySigning, java.lang.String contentEncryptionAlgorithmIdentifier, boolean encryptionEnabled, boolean signingEnabled, int signingKeyLength, int encryptionKeyLength)  
      protected BaseStringCipherExecutor​(java.lang.String secretKeyEncryption, java.lang.String secretKeySigning, java.lang.String contentEncryptionAlgorithmIdentifier, int signingKeySize, int encryptionKeySize)  
    • Constructor Detail

      • BaseStringCipherExecutor

        protected BaseStringCipherExecutor​(java.lang.String secretKeyEncryption,
                                           java.lang.String secretKeySigning,
                                           boolean encryptionEnabled,
                                           boolean signingEnabled,
                                           int signingKeySize,
                                           int encryptionKeySize)
      • BaseStringCipherExecutor

        protected BaseStringCipherExecutor​(java.lang.String secretKeyEncryption,
                                           java.lang.String secretKeySigning,
                                           boolean encryptionEnabled,
                                           int signingKeySize,
                                           int encryptionKeySize)
      • BaseStringCipherExecutor

        protected BaseStringCipherExecutor​(java.lang.String secretKeyEncryption,
                                           java.lang.String secretKeySigning,
                                           java.lang.String contentEncryptionAlgorithmIdentifier,
                                           int signingKeySize,
                                           int encryptionKeySize)
      • BaseStringCipherExecutor

        protected BaseStringCipherExecutor​(java.lang.String secretKeyEncryption,
                                           java.lang.String secretKeySigning,
                                           int signingKeySize,
                                           int encryptionKeySize)
      • BaseStringCipherExecutor

        protected BaseStringCipherExecutor​(java.lang.String secretKeyEncryption,
                                           java.lang.String secretKeySigning,
                                           java.lang.String contentEncryptionAlgorithmIdentifier,
                                           boolean encryptionEnabled,
                                           boolean signingEnabled,
                                           int signingKeyLength,
                                           int encryptionKeyLength)
    • Method Detail

      • encode

        public java.lang.String encode​(java.io.Serializable value,
                                       java.lang.Object[] parameters)
      • decode

        public java.lang.String decode​(java.io.Serializable value,
                                       java.lang.Object[] parameters)
      • decode

        protected java.lang.String decode​(java.io.Serializable value,
                                          java.lang.Object[] parameters,
                                          java.security.Key encryptionKey,
                                          java.security.Key signingKey)
        Decode value.
        Parameters:
        value - the value
        parameters - the parameters
        encryptionKey - the encryption key
        signingKey - the signing key
        Returns:
        the string
      • configureEncryptionKeyFromPublicKeyResource

        protected void configureEncryptionKeyFromPublicKeyResource​(java.lang.String secretKeyToUse)
        Configure encryption key from public key resource.
        Parameters:
        secretKeyToUse - the secret key to use
      • isEncryptionPossible

        protected boolean isEncryptionPossible​(java.security.Key key)
        Is encryption possible?
        Parameters:
        key - the key
        Returns:
        true /false
      • getEncryptionKeySetting

        protected java.lang.String getEncryptionKeySetting()
        Gets encryption key setting.
        Returns:
        the encryption key setting
      • getSigningKeySetting

        protected java.lang.String getSigningKeySetting()
        Gets signing key setting.
        Returns:
        the signing key setting