Skip to main content
createSecretKey - node__crypto.d.ts - Node documentation
function createSecretKey

Usage in Deno

```typescript import { createSecretKey } from "node:node__crypto.d.ts"; ```
createSecretKey(key: ArrayBufferView): KeyObject
Creates and returns a new key object containing a secret key for symmetric encryption or `Hmac`.

Parameters

key: ArrayBufferView

Return Type

createSecretKey(
key: string,
encoding: BufferEncoding,
): KeyObject

Parameters

key: string
encoding: BufferEncoding

Return Type