open(_:using:)

    Authenticates and decrypts data using AES-GCM-SIV.

    AES_GCM_SIV.swift:77
    static func open(_ sealedBox: SealedBox, using key: SymmetricKey) throws -> Data

    Parameters

    sealedBox

    The sealed box to authenticate and decrypt

    key

    An encryption key of 128 or 256 bits

    nonce

    An Nonce for AES-GCM-SIV encryption. The nonce must be unique for every use of the key to seal data. It can be safely generated with AES.GCM.Nonce().

    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