exportBinaryBase64
Export a key as raw base64 (no PEM headers).
Returns SPKI-encoded base64 for public keys, PKCS#8-encoded base64 for private keys. Useful for compact storage or transmission where PEM overhead is undesirable.
ts
function exportBinaryBase64(
key: CryptoKey,
): Promise<string>Parameters
key:CryptoKey
Throws
Error— If the key is a symmetric/secret key
See also
importSpkiBase64for public key importimportPkcs8Base64for private key import