Module io.github.mmm.crypto.bc
Class SignatureFactoryEcBcWithRecoveryId
- java.lang.Object
-
- io.github.mmm.crypto.asymmetric.sign.ec.bc.SignatureFactoryEcBc<SignatureEcBcWithRecoveryId>
-
- io.github.mmm.crypto.asymmetric.sign.ec.bc.SignatureFactoryEcBcWithRecoveryId
-
- All Implemented Interfaces:
SignatureFactory<SignatureEcBcWithRecoveryId>
public class SignatureFactoryEcBcWithRecoveryId extends SignatureFactoryEcBc<SignatureEcBcWithRecoveryId>
Implementation ofSignatureFactory
forSignatureEcBcWithRecoveryId
.- Since:
- 1.0.0
-
-
Field Summary
-
Fields inherited from class io.github.mmm.crypto.asymmetric.sign.ec.bc.SignatureFactoryEcBc
curve
-
-
Constructor Summary
Constructors Constructor Description SignatureFactoryEcBcWithRecoveryId(CryptoEllipticCurveBc curve)
The constructor.SignatureFactoryEcBcWithRecoveryId(CryptoEllipticCurveBc curve, byte recoveryOffset)
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SignatureEcBcWithRecoveryId
create(BigInteger r, BigInteger s, byte[] message, org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPublicKey publicKey)
SignatureEcBcWithRecoveryId
createSignature(byte[] data)
-
-
-
Constructor Detail
-
SignatureFactoryEcBcWithRecoveryId
public SignatureFactoryEcBcWithRecoveryId(CryptoEllipticCurveBc curve)
The constructor.- Parameters:
curve
- theelliptic curve
.
-
SignatureFactoryEcBcWithRecoveryId
public SignatureFactoryEcBcWithRecoveryId(CryptoEllipticCurveBc curve, byte recoveryOffset)
The constructor.- Parameters:
curve
- theelliptic curve
.recoveryOffset
- therecovery offset
.
-
-
Method Detail
-
createSignature
public SignatureEcBcWithRecoveryId createSignature(byte[] data)
- Parameters:
data
- thebinary signature data
.- Returns:
- the deserialized
SignatureBinary
.
-
create
public SignatureEcBcWithRecoveryId create(BigInteger r, BigInteger s, byte[] message, org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPublicKey publicKey)
- Specified by:
create
in classSignatureFactoryEcBc<SignatureEcBcWithRecoveryId>
- Parameters:
r
- the valuer
.s
- the values
.message
- the signed message (hash).publicKey
- theBCECPublicKey
that was used to sign the message.- Returns:
- the signature.
-
-