Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function generateKeyPairSync
import { generateKeyPairSync } from "https://deno.land/std@0.167.0/node/internal/crypto/keygen.ts";

Parameters

type: "rsa"
options: RSAKeyPairOptions<"pem", "pem">

Returns

KeyPairSyncResult<string, string>

Parameters

type: "rsa"
options: RSAKeyPairOptions<"pem", "der">

Parameters

type: "rsa"
options: RSAKeyPairOptions<"der", "pem">

Parameters

type: "rsa-pss"
options: RSAPSSKeyPairOptions<"pem", "pem">

Returns

KeyPairSyncResult<string, string>

Parameters

type: "rsa-pss"
options: RSAPSSKeyPairOptions<"pem", "der">

Parameters

type: "rsa-pss"
options: RSAPSSKeyPairOptions<"der", "pem">

Parameters

type: "dsa"
options: DSAKeyPairOptions<"pem", "pem">

Returns

KeyPairSyncResult<string, string>

Parameters

type: "dsa"
options: DSAKeyPairOptions<"pem", "der">

Parameters

type: "dsa"
options: DSAKeyPairOptions<"der", "pem">

Parameters

type: "ec"
options: ECKeyPairOptions<"pem", "pem">

Returns

KeyPairSyncResult<string, string>

Parameters

type: "ec"
options: ECKeyPairOptions<"pem", "der">

Parameters

type: "ec"
options: ECKeyPairOptions<"der", "pem">

Parameters

type: "ed25519"
options: ED25519KeyPairOptions<"pem", "pem">

Returns

KeyPairSyncResult<string, string>

Parameters

type: "ed25519"
options: ED25519KeyPairOptions<"pem", "der">

Parameters

type: "ed25519"
options: ED25519KeyPairOptions<"der", "pem">

Parameters

type: "ed448"
options: ED448KeyPairOptions<"pem", "pem">

Returns

KeyPairSyncResult<string, string>

Parameters

type: "ed448"
options: ED448KeyPairOptions<"pem", "der">

Parameters

type: "ed448"
options: ED448KeyPairOptions<"der", "pem">

Parameters

type: "x25519"
options: X25519KeyPairOptions<"pem", "pem">

Returns

KeyPairSyncResult<string, string>

Parameters

type: "x25519"
options: X25519KeyPairOptions<"pem", "der">

Parameters

type: "x25519"
options: X25519KeyPairOptions<"der", "pem">

Parameters

type: "x448"
options: X448KeyPairOptions<"pem", "pem">

Returns

KeyPairSyncResult<string, string>

Parameters

type: "x448"
options: X448KeyPairOptions<"pem", "der">

Parameters

type: "x448"
options: X448KeyPairOptions<"der", "pem">