Class RsaSecretEncryptor
java.lang.Object
org.springframework.security.crypto.encrypt.RsaSecretEncryptor
- All Implemented Interfaces:
BytesEncryptor
,RsaKeyHolder
,TextEncryptor
public class RsaSecretEncryptor
extends Object
implements BytesEncryptor, TextEncryptor, RsaKeyHolder
- Since:
- 6.3
-
Constructor Summary
ConstructorDescriptionRsaSecretEncryptor
(String pemData) RsaSecretEncryptor
(String encoding, PublicKey publicKey, PrivateKey privateKey) RsaSecretEncryptor
(String encoding, PublicKey publicKey, PrivateKey privateKey, RsaAlgorithm algorithm) RsaSecretEncryptor
(String encoding, PublicKey publicKey, PrivateKey privateKey, RsaAlgorithm algorithm, String salt, boolean gcm) RsaSecretEncryptor
(String pemData, RsaAlgorithm algorithm) RsaSecretEncryptor
(String pemData, RsaAlgorithm algorithm, String salt) RsaSecretEncryptor
(KeyPair keyPair) RsaSecretEncryptor
(KeyPair keyPair, RsaAlgorithm algorithm) RsaSecretEncryptor
(KeyPair keyPair, RsaAlgorithm algorithm, String salt) RsaSecretEncryptor
(KeyPair keyPair, RsaAlgorithm algorithm, String salt, boolean gcm) RsaSecretEncryptor
(PublicKey publicKey) RsaSecretEncryptor
(PublicKey publicKey, RsaAlgorithm algorithm) RsaSecretEncryptor
(PublicKey publicKey, RsaAlgorithm algorithm, String salt) RsaSecretEncryptor
(PublicKey publicKey, RsaAlgorithm algorithm, String salt, boolean gcm) RsaSecretEncryptor
(RsaAlgorithm algorithm) RsaSecretEncryptor
(RsaAlgorithm algorithm, boolean gcm) RsaSecretEncryptor
(RsaAlgorithm algorithm, String salt) RsaSecretEncryptor
(RsaAlgorithm algorithm, String salt, boolean gcm) -
Method Summary
-
Constructor Details
-
RsaSecretEncryptor
-
RsaSecretEncryptor
-
RsaSecretEncryptor
-
RsaSecretEncryptor
-
RsaSecretEncryptor
public RsaSecretEncryptor() -
RsaSecretEncryptor
-
RsaSecretEncryptor
-
RsaSecretEncryptor
-
RsaSecretEncryptor
-
RsaSecretEncryptor
-
RsaSecretEncryptor
-
RsaSecretEncryptor
-
RsaSecretEncryptor
-
RsaSecretEncryptor
-
RsaSecretEncryptor
-
RsaSecretEncryptor
-
RsaSecretEncryptor
-
RsaSecretEncryptor
public RsaSecretEncryptor(String encoding, PublicKey publicKey, PrivateKey privateKey, RsaAlgorithm algorithm) -
RsaSecretEncryptor
public RsaSecretEncryptor(String encoding, PublicKey publicKey, PrivateKey privateKey, RsaAlgorithm algorithm, String salt, boolean gcm)
-
-
Method Details
-
getPublicKey
- Specified by:
getPublicKey
in interfaceRsaKeyHolder
-
encrypt
Description copied from interface:TextEncryptor
Encrypt the raw text string.- Specified by:
encrypt
in interfaceTextEncryptor
-
decrypt
Description copied from interface:TextEncryptor
Decrypt the encrypted text string.- Specified by:
decrypt
in interfaceTextEncryptor
-
encrypt
public byte[] encrypt(byte[] byteArray) Description copied from interface:BytesEncryptor
Encrypt the byte array.- Specified by:
encrypt
in interfaceBytesEncryptor
-
decrypt
public byte[] decrypt(byte[] encryptedByteArray) Description copied from interface:BytesEncryptor
Decrypt the byte array.- Specified by:
decrypt
in interfaceBytesEncryptor
-
canDecrypt
public boolean canDecrypt()
-