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
| Type | Description |
|---|---|
number[]|ArrayBuffer|Uint8Array | Data to encrypt |
Example
import { encryptKey } from '@zos/crypto'
const key = new Uint8Array(16)
const encryptedKey = encryptKey(key)