<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CryptoKit",
  "identifier" : "/documentation/CryptoKit/SharedSecret/hkdfDerivedSymmetricKey(using:salt:sharedInfo:outputByteCount:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Apple CryptoKit"
    ],
    "preciseIdentifier" : "s:9CryptoKit12SharedSecretV23hkdfDerivedSymmetricKey5using4salt10sharedInfo15outputByteCountAA0gH0Vxm_q_q0_SitAA12HashFunctionRz10Foundation12DataProtocolR_AlMR0_r1_lF"
  },
  "title" : "hkdfDerivedSymmetricKey(using:salt:sharedInfo:outputByteCount:)"
}
-->

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

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

```
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

The derived symmetric key.

---

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)