Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/faster/vendor/jose/index.ts>KeyLike

A fast and optimized middleware server with an absurdly small amount of code (300 lines) built on top of Deno's native HTTP APIs with no dependencies. It also has a collection of useful middlewares: log file, serve static, CORS, session, rate limit, token, body parsers, redirect, proxy and handle upload. Fully compatible with Deno Deploy.
Latest
type alias KeyLike
import { type KeyLike } from "https://deno.land/x/faster@v11.7/vendor/jose/index.ts";

KeyLike are runtime-specific classes representing asymmetric keys or symmetric secrets. These are instances of !CryptoKey and additionally !KeyObject in Node.js runtime. !Uint8Array instances are also accepted as symmetric secret representation only.

key/import | Key Import Functions can be used to import PEM, or JWK formatted asymmetric keys and certificates to these runtime-specific representations.

In Node.js the !Buffer class is a subclass of !Uint8Array and so !Buffer can be provided for symmetric secrets as well.

!KeyObject is a representation of a key/secret available in the Node.js runtime. In addition to the key/import | Key Import Functions you may use the runtime APIs !createPublicKey, !createPrivateKey, and !createSecretKey to obtain a !KeyObject from your existing key material.

!CryptoKey is a representation of a key/secret available in the Browser and Web-interoperable runtimes. In addition to the key/import | Key Import Functions you may use the !SubtleCrypto.importKey API to obtain a !CryptoKey from your existing key material.

definition: { type: string; }