---
title: "init(bitCount:)"
framework: cryptokit
role: symbol
role_heading: Initializer
path: "cryptokit/symmetrickeysize/init(bitcount:)"
---

# init(bitCount:)

Creates a new key size of the given length.

## Declaration

```swift
init(bitCount: Int)
```

## Parameters

- `bitCount`: The number of bits in the key size.

## Discussion

Discussion In most cases, you can use one of the standard key sizes, like bits256. If instead you need a key with a non-standard size, use the init(bitCount:) initializer to create a custom key size.
