Class RsaSecretEncryptor

java.lang.Object
org.springframework.security.rsa.crypto.RsaSecretEncryptor
All Implemented Interfaces:
org.springframework.security.crypto.encrypt.BytesEncryptor, org.springframework.security.crypto.encrypt.TextEncryptor, RsaKeyHolder

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

  • Method Details

    • getPublicKey

      public String getPublicKey()
      Specified by:
      getPublicKey in interface RsaKeyHolder
    • 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
    • canDecrypt

      public boolean canDecrypt()