Skip to main content
Version: v3+

encryptKey

Start from API_LEVEL 3.0 . Please refer to API_LEVEL.

Encrypt data with the firmware PUF hardware module using AES. Input length must be a multiple of 16 bytes; returns undefined on failure.

Type

function encryptKey(data: CryptoData): ArrayBuffer | undefined

Parameters

CryptoData

TypeDescription
number[]|ArrayBuffer|Uint8ArrayData to encrypt

Example

import { encryptKey } from '@zos/crypto'

const key = new Uint8Array(16)
const encryptedKey = encryptKey(key)