ciphertext
TypeScriptget ciphertext(): ArrayBufferSwift declarationvar ciphertext: Data { get }The encrypted data. The length of the ciphertext of a sealed box is the same as the length of the plaintext you encrypt.
struct · iOS 13.0+ · SDK 27.1
struct SealedBoxA secure container for your data that you can access using a cipher. Use a sealed box as a container for data that you want to transmit securely. Seal data into a box with one of the cipher algorithms, like ``seal(_:using:nonce:)``. The box holds an encrypted version of the original data, an authentication tag, and the nonce during encryption. The encryption makes the data unintelligible to anyone without the key, while the authentication tag makes it possible for the intended receiver to be sure the data remains intact. The receiver uses another instance of the same cipher, like the ``open(_:using:)`` method, to open the box.
get ciphertext(): ArrayBufferSwift declarationvar ciphertext: Data { get }The encrypted data. The length of the ciphertext of a sealed box is the same as the length of the plaintext you encrypt.
get tag(): ArrayBufferSwift declarationvar tag: Data { get }An authentication tag. The authentication tag has a length of 16 bytes.
static initNonceCiphertextTag(nonce: AES_GCM_Nonce, ciphertext: ArrayBuffer, tag: ArrayBuffer): AES_GCM_SealedBoxSwift declarationinit<C, T>(nonce: AES.GCM.Nonce, ciphertext: C, tag: T) throws where C : DataProtocol, T : DataProtocolCreates a sealed box from the given tag, nonce, and ciphertext. - Parameters: - nonce: The nonce. - ciphertext: The encrypted data. - tag: The authentication tag.
get nonce(): AES_GCM_NonceSwift declarationvar nonce: AES.GCM.Nonce { get }The nonce used to encrypt the data.
get combined(): (ArrayBuffer) | nullSwift declarationvar combined: Data? { get }A combined element composed of the nonce, encrypted data, and authentication tag. The combined representation is only available when the ``AES/GCM/Nonce`` size is the default size of 12 bytes. The data layout of the combined representation is nonce, ciphertext, then tag.
static initCombined(combined: ArrayBuffer): AES_GCM_SealedBoxSwift declarationinit<D>(combined: D) throws where D : DataProtocolCreates a sealed box from the combined bytes of an authentication tag, nonce, and encrypted data. - Parameters: - combined: The combined bytes of the nonce, encrypted data, and authentication tag.
No declarations were skipped in this snapshot.