PublicKey

public struct PublicKey : NISTECPublicKey

Undocumented

P256 + PrivateKey

  • Verifies an ECDSA signature over the P256 elliptic curve.

    Declaration

    Swift

    public func isValidSignature<D>(_ signature: P256.Signing.ECDSASignature, for digest: D) -> Bool where D : Digest

    Parameters

    signature

    The signature to verify

    digest

    The digest that was signed.

    Return Value

    True if the signature is valid, false otherwise.

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

    Declaration

    Swift

    public func isValidSignature<D>(_ signature: P256.Signing.ECDSASignature, for data: D) -> Bool where D : DataProtocol

    Parameters

    signature

    The signature to verify

    data

    The data that was signed.

    Return Value

    True if the signature is valid, false otherwise.