https://github.com/panva/keyobject-to-cryptokey
Converts KeyObject instances to CryptoKey for use with a given JSON Web Algorithm
https://github.com/panva/keyobject-to-cryptokey
Last synced: 4 months ago
JSON representation
Converts KeyObject instances to CryptoKey for use with a given JSON Web Algorithm
- Host: GitHub
- URL: https://github.com/panva/keyobject-to-cryptokey
- Owner: panva
- License: mit
- Created: 2024-10-15T08:36:10.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-18T17:30:44.000Z (over 1 year ago)
- Last Synced: 2025-04-11T14:28:43.312Z (about 1 year ago)
- Language: TypeScript
- Size: 12.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# keyobject-to-cryptokey
Converts KeyObject instances to CryptoKey for use with a given JSON Web Algorithm
```ts
import { convert } from "keyobject-to-cryptokey";
let key!: crypto.KeyObject;
let alg!: string;
const cryptoKey = convert(key, alg);
```