Class AsymmetricCryptography
java.lang.Object
com.ulisesbocchio.jasyptspringboot.util.AsymmetricCryptography
AsymmetricCryptography class.
- Version:
- $Id: $Id
- Author:
- Sergio.U.Bocchio
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionAsymmetricCryptography(org.springframework.core.io.ResourceLoader resourceLoader) Constructor for AsymmetricCryptography. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]decrypt(byte[] msg, PrivateKey key) decrypt.byte[]encrypt.getPrivateKey(String resourceLocation, AsymmetricCryptography.KeyFormat format) getPrivateKey.getPrivateKey(org.springframework.core.io.Resource resource, AsymmetricCryptography.KeyFormat format) getPrivateKey.getPublicKey(String resourceLocation, AsymmetricCryptography.KeyFormat format) getPublicKey.getPublicKey(org.springframework.core.io.Resource resource, AsymmetricCryptography.KeyFormat format) getPublicKey.
-
Constructor Details
-
AsymmetricCryptography
public AsymmetricCryptography(org.springframework.core.io.ResourceLoader resourceLoader) Constructor for AsymmetricCryptography.
- Parameters:
resourceLoader- aResourceLoaderobject
-
-
Method Details
-
getPrivateKey
getPrivateKey.
- Parameters:
resourceLocation- aStringobjectformat- aAsymmetricCryptography.KeyFormatobject- Returns:
- a
PrivateKeyobject
-
getPrivateKey
public PrivateKey getPrivateKey(org.springframework.core.io.Resource resource, AsymmetricCryptography.KeyFormat format) getPrivateKey.
- Parameters:
resource- aResourceobjectformat- aAsymmetricCryptography.KeyFormatobject- Returns:
- a
PrivateKeyobject
-
getPublicKey
getPublicKey.
- Parameters:
resourceLocation- aStringobjectformat- aAsymmetricCryptography.KeyFormatobject- Returns:
- a
PublicKeyobject
-
getPublicKey
public PublicKey getPublicKey(org.springframework.core.io.Resource resource, AsymmetricCryptography.KeyFormat format) getPublicKey.
- Parameters:
resource- aResourceobjectformat- aAsymmetricCryptography.KeyFormatobject- Returns:
- a
PublicKeyobject
-
encrypt
encrypt.
- Parameters:
msg- an array ofbyteobjectskey- aPublicKeyobject- Returns:
- an array of
byteobjects
-
decrypt
decrypt.
- Parameters:
msg- an array ofbyteobjectskey- aPrivateKeyobject- Returns:
- an array of
byteobjects
-