Class RsaRawEncryptor

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

    public class RsaRawEncryptor
    extends 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​(KeyPair keyPair)
      • RsaRawEncryptor

        public RsaRawEncryptor​(String pemData)
      • RsaRawEncryptor

        public RsaRawEncryptor​(PublicKey publicKey)
    • Method Detail

      • encrypt

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

        public String decrypt​(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