sign(encryptedStream:encryptionContext:)
Signs an encrypted archive using the credentials stored in the specified encryption context.
Declaration
static func sign(encryptedStream: ArchiveByteStream, encryptionContext context: ArchiveEncryptionContext) throwsParameters
- encryptedStream:
A read-write byte stream that points to an encrypted archive.
- context:
The encryption context that provides the credentials.
Discussion
Close the encrypted stream before calling this function, and create the archive with a signatureMode other than none. Create the context that you pass to this function from the same archive and it must contain the signature encryption key and the signing private key.