---
title: "hkdfDerivedSymmetricKey(using:salt:sharedInfo:outputByteCount:)"
framework: cryptokit
role: symbol
role_heading: Instance Method
path: "cryptokit/sharedsecret/hkdfderivedsymmetrickey(using:salt:sharedinfo:outputbytecount:)"
---

# hkdfDerivedSymmetricKey(using:salt:sharedInfo:outputByteCount:)

Derives a symmetric encryption key from the secret using HKDF key derivation.

## Declaration

```swift
func hkdfDerivedSymmetricKey<H, Salt, SI>(using hashFunction: H.Type, salt: Salt, sharedInfo: SI, outputByteCount: Int) -> SymmetricKey where H : HashFunction, Salt : DataProtocol, SI : DataProtocol
```

## Parameters

- `hashFunction`: The hash function to use for key derivation.
- `salt`: The salt to use for key derivation.
- `sharedInfo`: The shared information to use for key derivation.
- `outputByteCount`: The length in bytes of resulting symmetric key.

## Return Value

Return Value The derived symmetric key.

## See Also

### Deriving keys

- [x963DerivedSymmetricKey(using:sharedInfo:outputByteCount:)](cryptokit/sharedsecret/x963derivedsymmetrickey(using:sharedinfo:outputbytecount:).md)
