PrivateKey

public struct PrivateKey : NISTECPrivateKey

Undocumented

P256 + PrivateKey

  • Generates an ECDSA signature over the P256 elliptic curve.

    Throws

    If there is a failure producing the signature

    Declaration

    Swift

    public func signature<D>(for digest: D) throws -> P256.Signing.ECDSASignature where D : Digest

    Parameters

    digest

    The digest to sign.

    Return Value

    The ECDSA Signature.

  • Generates an ECDSA signature over the P256 elliptic curve. SHA256 is used as the hash function.

    Throws

    If there is a failure producing the signature.

    Declaration

    Swift

    public func signature<D>(for data: D) throws -> P256.Signing.ECDSASignature where D : DataProtocol

    Parameters

    data

    The data to sign.

    Return Value

    The ECDSA Signature.