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