Class RsaRawEncryptor

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

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

      • RsaRawEncryptor

        public RsaRawEncryptor​(RsaAlgorithm algorithm)
      • RsaRawEncryptor

        public RsaRawEncryptor()
      • RsaRawEncryptor

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

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

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

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

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

        public RsaRawEncryptor​(java.lang.String encoding,
                               java.security.PublicKey publicKey,
                               java.security.PrivateKey privateKey,
                               RsaAlgorithm algorithm)
    • 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