<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CryptoKit",
  "identifier" : "/documentation/CryptoKit/HPKE/Sender",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Apple CryptoKit",
      "CryptoKit"
    ],
    "preciseIdentifier" : "s:9CryptoKit4HPKEO6SenderV"
  },
  "title" : "HPKE.Sender"
}
-->

# HPKE.Sender

A type that represents the sending side of an HPKE message exchange.

```
struct Sender
```

## Overview

To create encrypted messages, initialize a `Sender` specifying the appropriate cipher suite,
the recipient’s public key, and the additional cryptographic material relevant to your chosen mode of operation.
Call [`seal(_:)`](/documentation/CryptoKit/HPKE/Sender/seal(_:)) or [`seal(_:authenticating:)`](/documentation/CryptoKit/HPKE/Sender/seal(_:authenticating:)) on the `Sender` instance for each message
in turn to retrieve its ciphertext. The recipient of the messages needs to process them in the
same order as the `Sender`, using the same encryption mode, cipher suite, and key schedule information
(`info`), as well as the `Sender`’s [`encapsulatedKey`](/documentation/CryptoKit/HPKE/Sender/encapsulatedKey).

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

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)