---
title: "init(privateKey:ciphersuite:info:encapsulatedKey:)"
framework: cryptokit
role: symbol
role_heading: Initializer
path: "cryptokit/hpke/recipient/init(privatekey:ciphersuite:info:encapsulatedkey:)-7v86b"
---

# init(privateKey:ciphersuite:info:encapsulatedKey:)

Creates a recipient in base mode.

## Declaration

```swift
init<SK>(privateKey: SK, ciphersuite: HPKE.Ciphersuite, info: Data, encapsulatedKey: Data) throws where SK : HPKEKEMPrivateKey
```

## Parameters

- `privateKey`: The recipient’s private key for decrypting the incoming messages.
- `ciphersuite`: The cipher suite that defines the cryptographic algorithms to use.
- `info`: Data that the key derivation function uses to compute the symmetric key material. The sender and the recipient need to use the same info data.
- `encapsulatedKey`: The encapsulated symmetric key that the sender provides.

## Discussion

Discussion The Receiver decrypts messages in base mode using the encapsulated key with the key schedule information (info data). note: The system throws errors from HPKE.Errors when it encounters them.
