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
ConstructorsConstructorDescriptionRsaSecretEncryptor(String pemData) RsaSecretEncryptor(String encoding, PublicKey publicKey, @Nullable PrivateKey privateKey) RsaSecretEncryptor(String encoding, PublicKey publicKey, @Nullable PrivateKey privateKey, RsaAlgorithm algorithm) RsaSecretEncryptor(String encoding, PublicKey publicKey, @Nullable 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, @Nullable PrivateKey privateKey, RsaAlgorithm algorithm) -
RsaSecretEncryptor
public RsaSecretEncryptor(String encoding, PublicKey publicKey, @Nullable PrivateKey privateKey, RsaAlgorithm algorithm, String salt, boolean gcm)
-
-
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
-
canDecrypt
public boolean canDecrypt()
-