PrivateKey

public struct PrivateKey : ECPrivateKey

A Private Key for signing

  • Generates a Curve25519 Signing Key.

    Declaration

    Swift

    public init()
  • The associated public key for verifying signatures done with this private key.

    Declaration

    Swift

    public var publicKey: PublicKey { get }

    Return Value

    The associated public key

  • Undocumented

    Declaration

    Swift

    public init<D>(rawRepresentation data: D) throws where D : ContiguousBytes
  • A data representation of the private key

    Declaration

    Swift

    public var rawRepresentation: Data { get }
  • Generates an EdDSA signature over Curve25519.

    Throws

    If there is a failure producing the signature.

    Declaration

    Swift

    public func signature<D>(for data: D) throws -> Data where D : DataProtocol

    Parameters

    data

    The data to sign.

    Return Value

    The 64-bytes signature.