seal(inPlace:using:nonce:authenticating:tag:)
Secures the given plaintext message in place with encryption and an authentication tag.
Declaration
static func seal(inPlace message: inout MutableRawSpan, using key: SymmetricKey, nonce: ChaChaPoly.Nonce, authenticating authenticatedData: RawSpan? = nil, tag: inout OutputRawSpan) throwsParameters
- message:
The plaintext data to seal.
- key:
A cryptographic key used to seal the message.
- nonce:
The nonce the sealing process requires.
- authenticatedData:
Additional data to be authenticated.
- tag:
Will be updated with the 16-byte authentication tag.