Static Methodswift-crypto 3.8.0_CryptoExtras->Crypto
open(_:using:)
Authenticates and decrypts data using AES-GCM-SIV.
AES_GCM_SIV.swift:77static func open(_ sealedBox: SealedBox, using key: SymmetricKey) throws -> Data
Parameters
Returns
The ciphertext if opening was successful
Throws
CipherError errors. If the authentication of the sealed box failed, incorrectTag is thrown.
Other members in extension
Types
Show implementation details (2)
Hide implementation details
Type members
Show implementation details (3)
Hide implementation details
static func open<AuthenticatedData>(SealedBox, using: SymmetricKey, authenticating: AuthenticatedData
) throws -> Data Authenticates and decrypts data using AES-GCM-SIV.
static func seal<Plaintext>(Plaintext, using: SymmetricKey, nonce: Nonce?
) throws -> SealedBox Encrypts and authenticates data using AES-GCM-SIV.
static func seal<Plaintext, AuthenticatedData>(Plaintext, using: SymmetricKey, nonce: Nonce?, authenticating: AuthenticatedData
) throws -> SealedBox Encrypts and authenticates data using AES-GCM-SIV.