---
title: "init(rawRepresentation:)"
framework: cryptokit
role: symbol
role_heading: Initializer
path: "cryptokit/curve25519/keyagreement/privatekey/init(rawrepresentation:)"
---

# init(rawRepresentation:)

Creates a Curve25519 private key for key agreement from a collection of bytes.

## Declaration

```swift
init<D>(rawRepresentation: D) throws where D : ContiguousBytes
```

## Parameters

- `rawRepresentation`: A raw representation of the key as a collection of contiguous bytes.

## See Also

### Creating a private key

- [init()](cryptokit/curve25519/keyagreement/privatekey/init().md)
