Module io.github.mmm.crypto
Interface SignatureProcessorFactory<S extends SignatureBinary,PR extends PrivateKey,PU extends PublicKey>
-
- Type Parameters:
S
- type ofSignatureBinary
.PR
- type ofPrivateKey
.PU
- type ofPublicKey
.
- All Superinterfaces:
SignatureFactory<S>
- All Known Implementing Classes:
AsymmetricAccess
,AsymmetricAccessEcBc
,Curve25519
,Rsa
,Secp256k1
,SignatureProcessorFactoryImpl
,SignatureProcessorFactoryImplCryptorWithHash
,SignatureProcessorFactoryImplEcBc
,SignatureProcessorFactoryImplWithHash
public interface SignatureProcessorFactory<S extends SignatureBinary,PR extends PrivateKey,PU extends PublicKey> extends SignatureFactory<S>
Interface for afactory
to create instances ofSignatureProcessor
forasymmetric cryptography
.Signatures
only work with asymmetric security. For a givenprivate key
aSignatureSigner
can becreated
that allows tosign
any message. With the correspondingpublic key
anyone cancreate
aSignatureVerifier
toverify
theSignatureBinary
.
An instance ofSignatureProcessorFactory
typically combines asymmetriccryptography
withhashing
.- Since:
- 1.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description SignatureProcessorFactory<S,PR,PU>
getSignatureFactoryWithoutHash()
SignatureSigner<S>
newSigner(PR privateKey)
default SignatureSigner<S>
newSignerUnsafe(PrivateKey privateKey)
SignatureVerifier<S>
newVerifier(PU publicKey)
default SignatureVerifier<S>
newVerifierUnsafe(PublicKey publicKey)
-
Methods inherited from interface io.github.mmm.crypto.asymmetric.sign.SignatureFactory
createSignature
-
-
-
-
Method Detail
-
newSignerUnsafe
default SignatureSigner<S> newSignerUnsafe(PrivateKey privateKey)
- Parameters:
privateKey
- thePrivateKey
to use for signing.- Returns:
- the
SignatureSigner
for signing.
-
newSigner
SignatureSigner<S> newSigner(PR privateKey)
- Parameters:
privateKey
- thePrivateKey
to use for signing.- Returns:
- the
SignatureSigner
for signing.
-
newVerifierUnsafe
default SignatureVerifier<S> newVerifierUnsafe(PublicKey publicKey)
- Parameters:
publicKey
- thePublicKey
to use for verifying.- Returns:
- the
SignatureVerifier
for verifying.
-
newVerifier
SignatureVerifier<S> newVerifier(PU publicKey)
- Parameters:
publicKey
- thePublicKey
to use for verifying.- Returns:
- the
SignatureVerifier
for verifying.
-
getSignatureFactoryWithoutHash
SignatureProcessorFactory<S,PR,PU> getSignatureFactoryWithoutHash()
- Returns:
- an instance of this
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).
-
-