public class AsymmetricCrypto extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
privateKeyEntryString |
protected SecurityProviderConnector |
securityProviderConnector |
| Constructor and Description |
|---|
AsymmetricCrypto(SecurityProviderConnector securityProviderConnector) |
AsymmetricCrypto(SecurityProviderConnector securityProviderConnector,
String privateKeyEntry) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsPrivateKey(char[] password,
InputStream pkcs12Stream) |
boolean |
containsPublicKey(Reader pemReader) |
byte[] |
decrypt(byte[] encrypted,
char[] password,
InputStream pkcs12Stream) |
byte[] |
decrypt(byte[] encrypted,
PrivateKey privateKey) |
byte[] |
encrypt(byte[] plain,
PublicKey publicKey) |
byte[] |
encrypt(byte[] plain,
Reader pemReader) |
protected PrivateKey |
extractPrivateKey(char[] password,
InputStream pkcs12Stream) |
protected PublicKey |
extractPublicKey(Reader pemReader) |
protected final String privateKeyEntryString
protected final SecurityProviderConnector securityProviderConnector
public AsymmetricCrypto(SecurityProviderConnector securityProviderConnector)
public AsymmetricCrypto(SecurityProviderConnector securityProviderConnector, String privateKeyEntry)
public byte[] decrypt(byte[] encrypted,
char[] password,
InputStream pkcs12Stream)
public byte[] decrypt(byte[] encrypted,
PrivateKey privateKey)
public byte[] encrypt(byte[] plain,
PublicKey publicKey)
public byte[] encrypt(byte[] plain,
Reader pemReader)
protected final PrivateKey extractPrivateKey(char[] password, InputStream pkcs12Stream) throws NoSuchProviderException, KeyStoreException, CertificateException, NoSuchAlgorithmException, IOException, UnrecoverableEntryException
protected final PublicKey extractPublicKey(Reader pemReader) throws CryptoException
CryptoExceptionpublic final boolean containsPrivateKey(char[] password,
InputStream pkcs12Stream)
public final boolean containsPublicKey(Reader pemReader)
Copyright © 2016 P-ACS UG. All rights reserved.