S - type of SignatureBinary.PR - type of PrivateKey.PU - type of PublicKey.PAIR - type of AsymmetricKeyPair.KC - type of AsymmetricKeyCreator.public abstract class AsymmetricAccess<S extends SignatureBinary,PR extends PrivateKey,PU extends PublicKey,PAIR extends AsymmetricKeyPair<PR,PU>,KC extends AsymmetricKeyCreator<PR,PU,PAIR>> extends CryptoAccess implements AsymmetricKeyCreatorFactory<KC>, AsymmetricCryptorFactory<PR,PU>, SignatureProcessorFactory<S,PR,PU>, HashFactory
key management,
encryption/decryption, and signature management based on asymmetric
cryptography.| Modifier and Type | Field and Description |
|---|---|
protected AsymmetricCryptorConfig<PR,PU> |
cryptorConfig
|
private HashAccess |
hashFactory |
private KC |
keyCreator |
protected RandomFactory |
randomFactory
The
RandomFactory. |
private SignatureConfig<S> |
signatureConfig |
private SignatureProcessorFactory<S,PR,PU> |
signatureFactory |
| Constructor and Description |
|---|
AsymmetricAccess(SignatureConfig<S> signatureConfig,
AsymmetricCryptorConfig<PR,PU> cryptorConfig,
RandomFactory randomFactory)
The constructor.
|
AsymmetricAccess(SignatureConfig<S> signatureConfig,
SignatureProcessorFactory<S,PR,PU> signatureFactory,
AsymmetricCryptorConfig<PR,PU> cryptorConfig,
RandomFactory randomFactory)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
S |
createSignature(byte[] data) |
AsymmetricCryptorConfig<PR,PU> |
getCryptorConfig() |
private KC |
getKeyCreatorInternal() |
SignatureConfig<S> |
getSignatureConfig() |
SignatureProcessorFactory<S,PR,PU> |
getSignatureFactoryWithoutHash() |
Decryptor |
newDecryptor(PR privateKey) |
Decryptor |
newDecryptorUnsafe(Key decryptionKey)
Please use typesafe
newEncryptor method instead to avoid mistakes (passing wrong Key). |
Encryptor |
newEncryptor(PU publicKey) |
Encryptor |
newEncryptorUnsafe(Key encryptionKey)
Please use typesafe
newDecryptor method instead to avoid mistakes (passing wrong Key). |
HashCreator |
newHashCreator() |
SignatureSigner<S> |
newSigner(PR privateKey) |
SignatureVerifier<S> |
newVerifier(PU publicKey) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnewKeyCreatornewSignerUnsafe, newVerifierUnsafeprotected final AsymmetricCryptorConfig<PR extends PrivateKey,PU extends PublicKey> cryptorConfig
private final SignatureConfig<S extends SignatureBinary> signatureConfig
protected final RandomFactory randomFactory
RandomFactory.private final SignatureProcessorFactory<S extends SignatureBinary,PR extends PrivateKey,PU extends PublicKey> signatureFactory
private final HashAccess hashFactory
private KC extends AsymmetricKeyCreator<PR,PU,PAIR> keyCreator
public AsymmetricAccess(SignatureConfig<S> signatureConfig, AsymmetricCryptorConfig<PR,PU> cryptorConfig, RandomFactory randomFactory)
signatureConfig - the SignatureConfig.cryptorConfig - the AsymmetricCryptorConfig.randomFactory - the RandomFactory.public AsymmetricAccess(SignatureConfig<S> signatureConfig, SignatureProcessorFactory<S,PR,PU> signatureFactory, AsymmetricCryptorConfig<PR,PU> cryptorConfig, RandomFactory randomFactory)
signatureConfig - the SignatureConfig.signatureFactory - the SignatureProcessorFactory.cryptorConfig - the AsymmetricCryptorConfig.randomFactory - the RandomFactory.public SignatureConfig<S> getSignatureConfig()
SignatureConfig.public AsymmetricCryptorConfig<PR,PU> getCryptorConfig()
AsymmetricCryptorConfig.private KC getKeyCreatorInternal()
public Decryptor newDecryptorUnsafe(Key decryptionKey)
CryptorFactorynewEncryptor method instead to avoid mistakes (passing wrong Key).newDecryptorUnsafe in interface CryptorFactorydecryptionKey - the Key to use for decryption.Decryptor for decryption.public Decryptor newDecryptor(PR privateKey)
newDecryptor in interface AsymmetricCryptorFactory<PR extends PrivateKey,PU extends PublicKey>privateKey - the PrivateKey to use for decryption.Decryptor for decryption.public Encryptor newEncryptorUnsafe(Key encryptionKey)
CryptorFactorynewDecryptor method instead to avoid mistakes (passing wrong Key).newEncryptorUnsafe in interface CryptorFactoryencryptionKey - the Key to use for encryption.Encryptor for encryption.public Encryptor newEncryptor(PU publicKey)
newEncryptor in interface AsymmetricCryptorFactory<PR extends PrivateKey,PU extends PublicKey>publicKey - the PublicKey to use for encryption.Encryptor for encryption.public SignatureSigner<S> newSigner(PR privateKey)
newSigner in interface SignatureProcessorFactory<S extends SignatureBinary,PR extends PrivateKey,PU extends PublicKey>privateKey - the PrivateKey to use for signing.SignatureSigner for signing.public SignatureVerifier<S> newVerifier(PU publicKey)
newVerifier in interface SignatureProcessorFactory<S extends SignatureBinary,PR extends PrivateKey,PU extends PublicKey>publicKey - the PublicKey to use for verifying.SignatureVerifier for verifying.public S createSignature(byte[] data)
createSignature in interface SignatureFactory<S extends SignatureBinary>data - the binary signature data.SignatureBinary.public HashCreator newHashCreator()
newHashCreator in interface HashFactoryHashCreator for the configured hash algorithm of this factory.public SignatureProcessorFactory<S,PR,PU> getSignatureFactoryWithoutHash()
getSignatureFactoryWithoutHash in interface SignatureProcessorFactory<S extends SignatureBinary,PR extends PrivateKey,PU extends PublicKey>SignatureFactory that does not hash before signing so you can control
the hashing manually and only sign the resulting hash (e.g. to reuse the hash value for further
calculations).Copyright © 2001–2019 mmm-Team. All rights reserved.