Functions
createPrivateKeyFromBytes
createPrivateKeyFromBytes(
bytes
,extractable?
):Promise
<CryptoKey
>
Given a private key represented as a 32-byte Uint8Array
, creates an Ed25519 private key for use
with other methods in this package that accept
CryptoKey
objects.
Parameters
Parameter | Type | Description |
---|---|---|
bytes | ReadonlyUint8Array | 32 bytes that represent the private key |
extractable? | boolean | Setting this to true makes it possible to extract the bytes of the private key using the crypto.subtle.exportKey() API. Defaults to false . |