Class SimpleAsymmetricConfig
java.lang.Object
com.ulisesbocchio.jasyptspringboot.encryptor.SimpleAsymmetricConfig
High level configuration class that provides a fallback mechanism to load private/public keys from three different
sources in the following order:
A Spring Resource
A String containing the public/private key
A String containing the resource location that contains the public/private key
- Version:
- $Id: $Id
- Author:
- Ulises Bocchio
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.core.io.ResourceloadPrivateKeyResource.org.springframework.core.io.ResourceloadPublicKeyResource.voidsetKeyFormat(AsymmetricCryptography.KeyFormat keyFormat) setKeyFormat.
-
Constructor Details
-
SimpleAsymmetricConfig
public SimpleAsymmetricConfig()
-
-
Method Details
-
loadPrivateKeyResource
public org.springframework.core.io.Resource loadPrivateKeyResource()loadPrivateKeyResource.
- Returns:
- a
Resourceobject
-
loadPublicKeyResource
public org.springframework.core.io.Resource loadPublicKeyResource()loadPublicKeyResource.
- Returns:
- a
Resourceobject
-
setKeyFormat
setKeyFormat.
- Parameters:
keyFormat- aAsymmetricCryptography.KeyFormatobject
-