Class RsaRawEncryptor
java.lang.Object
org.springframework.security.crypto.encrypt.RsaRawEncryptor
- All Implemented Interfaces:
BytesEncryptor,RsaKeyHolder,TextEncryptor
- Since:
- 6.3
-
Constructor Summary
ConstructorsConstructorDescriptionRsaRawEncryptor(String pemData) RsaRawEncryptor(String encoding, PublicKey publicKey, PrivateKey privateKey) RsaRawEncryptor(String encoding, PublicKey publicKey, PrivateKey privateKey, RsaAlgorithm algorithm) RsaRawEncryptor(KeyPair keyPair) RsaRawEncryptor(KeyPair keyPair, RsaAlgorithm algorithm) RsaRawEncryptor(PublicKey publicKey) RsaRawEncryptor(RsaAlgorithm algorithm) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]decrypt(byte[] encryptedByteArray) Decrypt the byte array.Decrypt the encrypted text string.byte[]encrypt(byte[] byteArray) Encrypt the byte array.Encrypt the raw text string.static intgetByteLength(RSAKey key)
-
Constructor Details
-
RsaRawEncryptor
-
RsaRawEncryptor
public RsaRawEncryptor() -
RsaRawEncryptor
-
RsaRawEncryptor
-
RsaRawEncryptor
-
RsaRawEncryptor
-
RsaRawEncryptor
-
RsaRawEncryptor
public RsaRawEncryptor(String encoding, PublicKey publicKey, PrivateKey privateKey, RsaAlgorithm algorithm)
-
-
Method Details
-
getPublicKey
- Specified by:
getPublicKeyin interfaceRsaKeyHolder
-
encrypt
Description copied from interface:TextEncryptorEncrypt the raw text string.- Specified by:
encryptin interfaceTextEncryptor
-
decrypt
Description copied from interface:TextEncryptorDecrypt the encrypted text string.- Specified by:
decryptin interfaceTextEncryptor
-
encrypt
public byte[] encrypt(byte[] byteArray) Description copied from interface:BytesEncryptorEncrypt the byte array.- Specified by:
encryptin interfaceBytesEncryptor
-
decrypt
public byte[] decrypt(byte[] encryptedByteArray) Description copied from interface:BytesEncryptorDecrypt the byte array.- Specified by:
decryptin interfaceBytesEncryptor
-
getByteLength
-