Package dev.sigstore.encryption.signers
Class EcdsaSigner
- java.lang.Object
-
- dev.sigstore.encryption.signers.EcdsaSigner
-
- All Implemented Interfaces:
Signer
public class EcdsaSigner extends java.lang.Object implements Signer
ECDSA signer, useSigners.newEcdsaSigner()to instantiate}.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.security.PublicKeygetPublicKey()Return the public key associated with this signer.byte[]sign(byte[] artifact)Sign an artifact.byte[]signDigest(byte[] artifactDigest)Sign an artifact digest.
-
-
-
Method Detail
-
getPublicKey
public java.security.PublicKey getPublicKey()
Description copied from interface:SignerReturn the public key associated with this signer.- Specified by:
getPublicKeyin interfaceSigner
-
sign
public byte[] sign(byte[] artifact) throws java.security.NoSuchAlgorithmException, java.security.InvalidKeyException, java.security.SignatureExceptionDescription copied from interface:SignerSign an artifact. Implementations will hash the artifact with sha256 before signing.
-
signDigest
public byte[] signDigest(byte[] artifactDigest) throws java.security.NoSuchAlgorithmException, java.security.InvalidKeyException, java.security.SignatureExceptionDescription copied from interface:SignerSign an artifact digest. Implementations will not further hash the inputs.- Specified by:
signDigestin interfaceSigner- Parameters:
artifactDigest- the sha256 digest of the artifact to be signed- Throws:
java.security.NoSuchAlgorithmExceptionjava.security.InvalidKeyExceptionjava.security.SignatureException
-
-