Class AsymmetricCryptography
- java.lang.Object
-
- com.ulisesbocchio.jasyptspringboot.util.AsymmetricCryptography
-
public class AsymmetricCryptography extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAsymmetricCryptography.KeyFormat
-
Constructor Summary
Constructors Constructor Description AsymmetricCryptography(org.springframework.core.io.ResourceLoader resourceLoader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]decrypt(byte[] msg, PrivateKey key)byte[]encrypt(byte[] msg, PublicKey key)PrivateKeygetPrivateKey(String resourceLocation, AsymmetricCryptography.KeyFormat format)PrivateKeygetPrivateKey(org.springframework.core.io.Resource resource, AsymmetricCryptography.KeyFormat format)PublicKeygetPublicKey(String resourceLocation, AsymmetricCryptography.KeyFormat format)PublicKeygetPublicKey(org.springframework.core.io.Resource resource, AsymmetricCryptography.KeyFormat format)
-
-
-
Method Detail
-
getPrivateKey
public PrivateKey getPrivateKey(String resourceLocation, AsymmetricCryptography.KeyFormat format)
-
getPrivateKey
public PrivateKey getPrivateKey(org.springframework.core.io.Resource resource, AsymmetricCryptography.KeyFormat format)
-
getPublicKey
public PublicKey getPublicKey(String resourceLocation, AsymmetricCryptography.KeyFormat format)
-
getPublicKey
public PublicKey getPublicKey(org.springframework.core.io.Resource resource, AsymmetricCryptography.KeyFormat format)
-
encrypt
public byte[] encrypt(byte[] msg, PublicKey key)
-
decrypt
public byte[] decrypt(byte[] msg, PrivateKey key)
-
-