Contents

setSigningPrivateKey(_:)

Sets the signing private key that corresponds to the signing public key that you used to create the archive.

Declaration

func setSigningPrivateKey(_ key: P256.Signing.PrivateKey) throws

Parameters

  • key:

    The signing private key.

Discussion

If you set this on an encryption stream, you don’t need to set the corresponding public key because Apple Archive derives the public key from the private key.

If you only provide a signing public key to the encryption stream, sign the archive with a private key after closing the stream. Use a private key that corresponds to the signing public key that you used to create the archive.

See Also

Setting and retrieving keys