Class EcdsaSignJce

  • All Implemented Interfaces:
    PublicKeySign

    @Immutable
    public final class EcdsaSignJce
    extends java.lang.Object
    implements PublicKeySign
    ECDSA signing with JCE.
    Since:
    1.0.0
    • Constructor Detail

      • EcdsaSignJce

        public EcdsaSignJce​(java.security.interfaces.ECPrivateKey privateKey,
                            Enums.HashType hash,
                            EllipticCurves.EcdsaEncoding encoding)
                     throws java.security.GeneralSecurityException
        Throws:
        java.security.GeneralSecurityException
    • Method Detail

      • create

        public static PublicKeySign create​(EcdsaPrivateKey key)
                                    throws java.security.GeneralSecurityException
        Throws:
        java.security.GeneralSecurityException
      • sign

        public byte[] sign​(byte[] data)
                    throws java.security.GeneralSecurityException
        Description copied from interface: PublicKeySign
        Computes the signature for data.
        Specified by:
        sign in interface PublicKeySign
        Returns:
        the signature of data
        Throws:
        java.security.GeneralSecurityException