<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CryptoKit",
  "identifier" : "/documentation/CryptoKit/AES/GCM/SealedBox",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Apple CryptoKit",
      "CryptoKit"
    ],
    "preciseIdentifier" : "s:9CryptoKit3AESO3GCMO9SealedBoxV"
  },
  "title" : "AES.GCM.SealedBox"
}
-->

# AES.GCM.SealedBox

A secure container for your data that you can access using a cipher.

```
struct SealedBox
```

## Overview

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:)`](/documentation/CryptoKit/AES/GCM/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:)`](/documentation/CryptoKit/AES/GCM/open(_:using:)) method, to open the box.

## Topics

### Creating the sealed box

[`init(nonce:ciphertext:tag:)`](/documentation/CryptoKit/AES/GCM/SealedBox/init(nonce:ciphertext:tag:))

Creates a sealed box from the given tag, nonce, and ciphertext.

[`init(combined:)`](/documentation/CryptoKit/AES/GCM/SealedBox/init(combined:))

Creates a sealed box from the combined bytes of an authentication
tag, nonce, and encrypted data.

### Retrieving the combined contents

[`combined`](/documentation/CryptoKit/AES/GCM/SealedBox/combined)

A combined element composed of the nonce, encrypted data, and
authentication tag.

### Inspecting the component elements

[`nonce`](/documentation/CryptoKit/AES/GCM/SealedBox/nonce)

The nonce used to encrypt the data.

[`ciphertext`](/documentation/CryptoKit/AES/GCM/SealedBox/ciphertext)

The encrypted data.

[`tag`](/documentation/CryptoKit/AES/GCM/SealedBox/tag)

An authentication tag.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)