@peculiar/webcrypto
Version:
A WebCrypto Polyfill for NodeJS
25 lines (24 loc) • 561 B
JavaScript
/**
* Copyright (c) 2019-2026, Peculiar Ventures
* SPDX-License-Identifier: MIT
*/
import { CryptoKey } from "../../keys/key.js";
// src/mechs/ed25519/crypto_key.ts
var Ed25519CryptoKey = class extends CryptoKey {
constructor(algorithm, extractable, usages, data) {
super();
this.algorithm = algorithm;
this.extractable = extractable;
this.usages = usages;
this.data = Buffer.from(data);
}
toJWK() {
return {
kty: "OKP",
crv: this.algorithm.name,
key_ops: this.usages,
ext: this.extractable
};
}
};
export { Ed25519CryptoKey };