public class AsymmetricCryptography extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AsymmetricCryptography.KeyFormat |
| Constructor and Description |
|---|
AsymmetricCryptography(org.springframework.core.io.ResourceLoader resourceLoader) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
decrypt(byte[] msg,
PrivateKey key) |
byte[] |
encrypt(byte[] msg,
PublicKey key) |
PrivateKey |
getPrivateKey(org.springframework.core.io.Resource resource,
AsymmetricCryptography.KeyFormat format) |
PrivateKey |
getPrivateKey(String resourceLocation,
AsymmetricCryptography.KeyFormat format) |
PublicKey |
getPublicKey(org.springframework.core.io.Resource resource,
AsymmetricCryptography.KeyFormat format) |
PublicKey |
getPublicKey(String resourceLocation,
AsymmetricCryptography.KeyFormat format) |
public AsymmetricCryptography(org.springframework.core.io.ResourceLoader resourceLoader)
public PrivateKey getPrivateKey(String resourceLocation, AsymmetricCryptography.KeyFormat format)
public PrivateKey getPrivateKey(org.springframework.core.io.Resource resource, AsymmetricCryptography.KeyFormat format)
public PublicKey getPublicKey(String resourceLocation, AsymmetricCryptography.KeyFormat format)
public PublicKey getPublicKey(org.springframework.core.io.Resource resource, AsymmetricCryptography.KeyFormat format)
public byte[] encrypt(byte[] msg,
PublicKey key)
public byte[] decrypt(byte[] msg,
PrivateKey key)
Copyright © 2019. All rights reserved.