Class RsaSecretEncryptor

  • All Implemented Interfaces:
    org.springframework.security.crypto.encrypt.BytesEncryptor, org.springframework.security.crypto.encrypt.TextEncryptor, RsaKeyHolder

    public class RsaSecretEncryptor
    extends java.lang.Object
    implements org.springframework.security.crypto.encrypt.BytesEncryptor, org.springframework.security.crypto.encrypt.TextEncryptor, RsaKeyHolder
    Author:
    Dave Syer
    • Constructor Detail

      • RsaSecretEncryptor

        public RsaSecretEncryptor​(RsaAlgorithm algorithm,
                                  java.lang.String salt,
                                  boolean gcm)
      • RsaSecretEncryptor

        public RsaSecretEncryptor​(RsaAlgorithm algorithm,
                                  java.lang.String salt)
      • RsaSecretEncryptor

        public RsaSecretEncryptor​(RsaAlgorithm algorithm,
                                  boolean gcm)
      • RsaSecretEncryptor

        public RsaSecretEncryptor​(RsaAlgorithm algorithm)
      • RsaSecretEncryptor

        public RsaSecretEncryptor()
      • RsaSecretEncryptor

        public RsaSecretEncryptor​(java.security.KeyPair keyPair,
                                  RsaAlgorithm algorithm,
                                  java.lang.String salt,
                                  boolean gcm)
      • RsaSecretEncryptor

        public RsaSecretEncryptor​(java.security.KeyPair keyPair,
                                  RsaAlgorithm algorithm,
                                  java.lang.String salt)
      • RsaSecretEncryptor

        public RsaSecretEncryptor​(java.security.KeyPair keyPair,
                                  RsaAlgorithm algorithm)
      • RsaSecretEncryptor

        public RsaSecretEncryptor​(java.security.KeyPair keyPair)
      • RsaSecretEncryptor

        public RsaSecretEncryptor​(java.lang.String pemData,
                                  RsaAlgorithm algorithm,
                                  java.lang.String salt)
      • RsaSecretEncryptor

        public RsaSecretEncryptor​(java.lang.String pemData,
                                  RsaAlgorithm algorithm)
      • RsaSecretEncryptor

        public RsaSecretEncryptor​(java.lang.String pemData)
      • RsaSecretEncryptor

        public RsaSecretEncryptor​(java.security.PublicKey publicKey,
                                  RsaAlgorithm algorithm,
                                  java.lang.String salt,
                                  boolean gcm)
      • RsaSecretEncryptor

        public RsaSecretEncryptor​(java.security.PublicKey publicKey,
                                  RsaAlgorithm algorithm,
                                  java.lang.String salt)
      • RsaSecretEncryptor

        public RsaSecretEncryptor​(java.security.PublicKey publicKey,
                                  RsaAlgorithm algorithm)
      • RsaSecretEncryptor

        public RsaSecretEncryptor​(java.security.PublicKey publicKey)
      • RsaSecretEncryptor

        public RsaSecretEncryptor​(java.lang.String encoding,
                                  java.security.PublicKey publicKey,
                                  java.security.PrivateKey privateKey)
      • RsaSecretEncryptor

        public RsaSecretEncryptor​(java.lang.String encoding,
                                  java.security.PublicKey publicKey,
                                  java.security.PrivateKey privateKey,
                                  RsaAlgorithm algorithm)
      • RsaSecretEncryptor

        public RsaSecretEncryptor​(java.lang.String encoding,
                                  java.security.PublicKey publicKey,
                                  java.security.PrivateKey privateKey,
                                  RsaAlgorithm algorithm,
                                  java.lang.String salt,
                                  boolean gcm)
    • Method Detail

      • encrypt

        public java.lang.String encrypt​(java.lang.String text)
        Specified by:
        encrypt in interface org.springframework.security.crypto.encrypt.TextEncryptor
      • decrypt

        public java.lang.String decrypt​(java.lang.String encryptedText)
        Specified by:
        decrypt in interface org.springframework.security.crypto.encrypt.TextEncryptor
      • encrypt

        public byte[] encrypt​(byte[] byteArray)
        Specified by:
        encrypt in interface org.springframework.security.crypto.encrypt.BytesEncryptor
      • decrypt

        public byte[] decrypt​(byte[] encryptedByteArray)
        Specified by:
        decrypt in interface org.springframework.security.crypto.encrypt.BytesEncryptor
      • canDecrypt

        public boolean canDecrypt()