Preparing search index...
The search index is not available bun-types
Function generateKeyPairSync
generate Key Pair Sync( type: "rsa" , options: "crypto" . RSAKeyPairOptions < "pem" , "pem" > ) : "crypto" . KeyPairSyncResult < string , string >
generate Key Pair Sync( type: "rsa" , options: "crypto" . RSAKeyPairOptions < "pem" , "der" > ) : "crypto" . KeyPairSyncResult < string , "buffer" . Buffer >
generate Key Pair Sync( type: "rsa" , options: "crypto" . RSAKeyPairOptions < "der" , "pem" > ) : "crypto" . KeyPairSyncResult < "buffer" . Buffer , string >
generate Key Pair Sync( type: "rsa" , options: "crypto" . RSAKeyPairOptions < "der" , "der" > ) : "crypto" . KeyPairSyncResult < "buffer" . Buffer , "buffer" . Buffer >
generate Key Pair Sync( type: "rsa" , options: "crypto" . RSAKeyPairKeyObjectOptions ) : "crypto" . KeyPairKeyObjectResult
generate Key Pair Sync( type: "rsa-pss" , options: "crypto" . RSAPSSKeyPairOptions < "pem" , "pem" > ) : "crypto" . KeyPairSyncResult < string , string >
generate Key Pair Sync( type: "rsa-pss" , options: "crypto" . RSAPSSKeyPairOptions < "pem" , "der" > ) : "crypto" . KeyPairSyncResult < string , "buffer" . Buffer >
generate Key Pair Sync( type: "rsa-pss" , options: "crypto" . RSAPSSKeyPairOptions < "der" , "pem" > ) : "crypto" . KeyPairSyncResult < "buffer" . Buffer , string >
generate Key Pair Sync( type: "rsa-pss" , options: "crypto" . RSAPSSKeyPairOptions < "der" , "der" > ) : "crypto" . KeyPairSyncResult < "buffer" . Buffer , "buffer" . Buffer >
generate Key Pair Sync( type: "rsa-pss" , options: "crypto" . RSAPSSKeyPairKeyObjectOptions ) : "crypto" . KeyPairKeyObjectResult
generate Key Pair Sync( type: "dsa" , options: "crypto" . DSAKeyPairOptions < "pem" , "pem" > ) : "crypto" . KeyPairSyncResult < string , string >
generate Key Pair Sync( type: "dsa" , options: "crypto" . DSAKeyPairOptions < "pem" , "der" > ) : "crypto" . KeyPairSyncResult < string , "buffer" . Buffer >
generate Key Pair Sync( type: "dsa" , options: "crypto" . DSAKeyPairOptions < "der" , "pem" > ) : "crypto" . KeyPairSyncResult < "buffer" . Buffer , string >
generate Key Pair Sync( type: "dsa" , options: "crypto" . DSAKeyPairOptions < "der" , "der" > ) : "crypto" . KeyPairSyncResult < "buffer" . Buffer , "buffer" . Buffer >
generate Key Pair Sync( type: "dsa" , options: "crypto" . DSAKeyPairKeyObjectOptions ) : "crypto" . KeyPairKeyObjectResult
generate Key Pair Sync( type: "ec" , options: "crypto" . ECKeyPairOptions < "pem" , "pem" > ) : "crypto" . KeyPairSyncResult < string , string >
generate Key Pair Sync( type: "ec" , options: "crypto" . ECKeyPairOptions < "pem" , "der" > ) : "crypto" . KeyPairSyncResult < string , "buffer" . Buffer >
generate Key Pair Sync( type: "ec" , options: "crypto" . ECKeyPairOptions < "der" , "pem" > ) : "crypto" . KeyPairSyncResult < "buffer" . Buffer , string >
generate Key Pair Sync( type: "ec" , options: "crypto" . ECKeyPairOptions < "der" , "der" > ) : "crypto" . KeyPairSyncResult < "buffer" . Buffer , "buffer" . Buffer >
generate Key Pair Sync( type: "ec" , options: "crypto" . ECKeyPairKeyObjectOptions ) : "crypto" . KeyPairKeyObjectResult
generate Key Pair Sync( type: "ed25519" , options: "crypto" . ED25519KeyPairOptions < "pem" , "pem" > ) : "crypto" . KeyPairSyncResult < string , string >
generate Key Pair Sync( type: "ed25519" , options: "crypto" . ED25519KeyPairOptions < "pem" , "der" > ) : "crypto" . KeyPairSyncResult < string , "buffer" . Buffer >
generate Key Pair Sync( type: "ed25519" , options: "crypto" . ED25519KeyPairOptions < "der" , "pem" > ) : "crypto" . KeyPairSyncResult < "buffer" . Buffer , string >
generate Key Pair Sync( type: "ed25519" , options: "crypto" . ED25519KeyPairOptions < "der" , "der" > ) : "crypto" . KeyPairSyncResult < "buffer" . Buffer , "buffer" . Buffer >
generate Key Pair Sync( type: "ed25519" , options?: "crypto" . ED25519KeyPairKeyObjectOptions ) : "crypto" . KeyPairKeyObjectResult
generate Key Pair Sync( type: "ed448" , options: "crypto" . ED448KeyPairOptions < "pem" , "pem" > ) : "crypto" . KeyPairSyncResult < string , string >
generate Key Pair Sync( type: "ed448" , options: "crypto" . ED448KeyPairOptions < "pem" , "der" > ) : "crypto" . KeyPairSyncResult < string , "buffer" . Buffer >
generate Key Pair Sync( type: "ed448" , options: "crypto" . ED448KeyPairOptions < "der" , "pem" > ) : "crypto" . KeyPairSyncResult < "buffer" . Buffer , string >
generate Key Pair Sync( type: "ed448" , options: "crypto" . ED448KeyPairOptions < "der" , "der" > ) : "crypto" . KeyPairSyncResult < "buffer" . Buffer , "buffer" . Buffer >
generate Key Pair Sync( type: "ed448" , options?: "crypto" . ED448KeyPairKeyObjectOptions ) : "crypto" . KeyPairKeyObjectResult
generate Key Pair Sync( type: "x25519" , options: "crypto" . X25519KeyPairOptions < "pem" , "pem" > ) : "crypto" . KeyPairSyncResult < string , string >
generate Key Pair Sync( type: "x25519" , options: "crypto" . X25519KeyPairOptions < "pem" , "der" > ) : "crypto" . KeyPairSyncResult < string , "buffer" . Buffer >
generate Key Pair Sync( type: "x25519" , options: "crypto" . X25519KeyPairOptions < "der" , "pem" > ) : "crypto" . KeyPairSyncResult < "buffer" . Buffer , string >
generate Key Pair Sync( type: "x25519" , options: "crypto" . X25519KeyPairOptions < "der" , "der" > ) : "crypto" . KeyPairSyncResult < "buffer" . Buffer , "buffer" . Buffer >
generate Key Pair Sync( type: "x25519" , options?: "crypto" . X25519KeyPairKeyObjectOptions ) : "crypto" . KeyPairKeyObjectResult
generate Key Pair Sync( type: "x448" , options: "crypto" . X448KeyPairOptions < "pem" , "pem" > ) : "crypto" . KeyPairSyncResult < string , string >
generate Key Pair Sync( type: "x448" , options: "crypto" . X448KeyPairOptions < "pem" , "der" > ) : "crypto" . KeyPairSyncResult < string , "buffer" . Buffer >
generate Key Pair Sync( type: "x448" , options: "crypto" . X448KeyPairOptions < "der" , "pem" > ) : "crypto" . KeyPairSyncResult < "buffer" . Buffer , string >
generate Key Pair Sync( type: "x448" , options: "crypto" . X448KeyPairOptions < "der" , "der" > ) : "crypto" . KeyPairSyncResult < "buffer" . Buffer , "buffer" . Buffer >
generate Key Pair Sync( type: "x448" , options?: "crypto" . X448KeyPairKeyObjectOptions ) : "crypto" . KeyPairKeyObjectResult
generate Key Pair Sync( type: "rsa" , options: "crypto" . RSAKeyPairOptions < "pem" , "pem" > ) : "crypto" . KeyPairSyncResult < string , string >
generate Key Pair Sync( type: "rsa" , options: "crypto" . RSAKeyPairOptions < "pem" , "der" > ) : "crypto" . KeyPairSyncResult < string , "buffer" . Buffer >
generate Key Pair Sync( type: "rsa" , options: "crypto" . RSAKeyPairOptions < "der" , "pem" > ) : "crypto" . KeyPairSyncResult < "buffer" . Buffer , string >
generate Key Pair Sync( type: "rsa" , options: "crypto" . RSAKeyPairOptions < "der" , "der" > ) : "crypto" . KeyPairSyncResult < "buffer" . Buffer , "buffer" . Buffer >
generate Key Pair Sync( type: "rsa" , options: "crypto" . RSAKeyPairKeyObjectOptions ) : "crypto" . KeyPairKeyObjectResult
generate Key Pair Sync( type: "rsa-pss" , options: "crypto" . RSAPSSKeyPairOptions < "pem" , "pem" > ) : "crypto" . KeyPairSyncResult < string , string >
generate Key Pair Sync( type: "rsa-pss" , options: "crypto" . RSAPSSKeyPairOptions < "pem" , "der" > ) : "crypto" . KeyPairSyncResult < string , "buffer" . Buffer >
generate Key Pair Sync( type: "rsa-pss" , options: "crypto" . RSAPSSKeyPairOptions < "der" , "pem" > ) : "crypto" . KeyPairSyncResult < "buffer" . Buffer , string >
generate Key Pair Sync( type: "rsa-pss" , options: "crypto" . RSAPSSKeyPairOptions < "der" , "der" > ) : "crypto" . KeyPairSyncResult < "buffer" . Buffer , "buffer" . Buffer >
generate Key Pair Sync( type: "rsa-pss" , options: "crypto" . RSAPSSKeyPairKeyObjectOptions ) : "crypto" . KeyPairKeyObjectResult
generate Key Pair Sync( type: "dsa" , options: "crypto" . DSAKeyPairOptions < "pem" , "pem" > ) : "crypto" . KeyPairSyncResult < string , string >
generate Key Pair Sync( type: "dsa" , options: "crypto" . DSAKeyPairOptions < "pem" , "der" > ) : "crypto" . KeyPairSyncResult < string , "buffer" . Buffer >
generate Key Pair Sync( type: "dsa" , options: "crypto" . DSAKeyPairOptions < "der" , "pem" > ) : "crypto" . KeyPairSyncResult < "buffer" . Buffer , string >
generate Key Pair Sync( type: "dsa" , options: "crypto" . DSAKeyPairOptions < "der" , "der" > ) : "crypto" . KeyPairSyncResult < "buffer" . Buffer , "buffer" . Buffer >
generate Key Pair Sync( type: "dsa" , options: "crypto" . DSAKeyPairKeyObjectOptions ) : "crypto" . KeyPairKeyObjectResult
generate Key Pair Sync( type: "ec" , options: "crypto" . ECKeyPairOptions < "pem" , "pem" > ) : "crypto" . KeyPairSyncResult < string , string >
generate Key Pair Sync( type: "ec" , options: "crypto" . ECKeyPairOptions < "pem" , "der" > ) : "crypto" . KeyPairSyncResult < string , "buffer" . Buffer >
generate Key Pair Sync( type: "ec" , options: "crypto" . ECKeyPairOptions < "der" , "pem" > ) : "crypto" . KeyPairSyncResult < "buffer" . Buffer , string >
generate Key Pair Sync( type: "ec" , options: "crypto" . ECKeyPairOptions < "der" , "der" > ) : "crypto" . KeyPairSyncResult < "buffer" . Buffer , "buffer" . Buffer >
generate Key Pair Sync( type: "ec" , options: "crypto" . ECKeyPairKeyObjectOptions ) : "crypto" . KeyPairKeyObjectResult
generate Key Pair Sync( type: "ed25519" , options: "crypto" . ED25519KeyPairOptions < "pem" , "pem" > ) : "crypto" . KeyPairSyncResult < string , string >
generate Key Pair Sync( type: "ed25519" , options: "crypto" . ED25519KeyPairOptions < "pem" , "der" > ) : "crypto" . KeyPairSyncResult < string , "buffer" . Buffer >
generate Key Pair Sync( type: "ed25519" , options: "crypto" . ED25519KeyPairOptions < "der" , "pem" > ) : "crypto" . KeyPairSyncResult < "buffer" . Buffer , string >
generate Key Pair Sync( type: "ed25519" , options: "crypto" . ED25519KeyPairOptions < "der" , "der" > ) : "crypto" . KeyPairSyncResult < "buffer" . Buffer , "buffer" . Buffer >
generate Key Pair Sync( type: "ed25519" , options?: "crypto" . ED25519KeyPairKeyObjectOptions ) : "crypto" . KeyPairKeyObjectResult
generate Key Pair Sync( type: "ed448" , options: "crypto" . ED448KeyPairOptions < "pem" , "pem" > ) : "crypto" . KeyPairSyncResult < string , string >
generate Key Pair Sync( type: "ed448" , options: "crypto" . ED448KeyPairOptions < "pem" , "der" > ) : "crypto" . KeyPairSyncResult < string , "buffer" . Buffer >
generate Key Pair Sync( type: "ed448" , options: "crypto" . ED448KeyPairOptions < "der" , "pem" > ) : "crypto" . KeyPairSyncResult < "buffer" . Buffer , string >
generate Key Pair Sync( type: "ed448" , options: "crypto" . ED448KeyPairOptions < "der" , "der" > ) : "crypto" . KeyPairSyncResult < "buffer" . Buffer , "buffer" . Buffer >
generate Key Pair Sync( type: "ed448" , options?: "crypto" . ED448KeyPairKeyObjectOptions ) : "crypto" . KeyPairKeyObjectResult
generate Key Pair Sync( type: "x25519" , options: "crypto" . X25519KeyPairOptions < "pem" , "pem" > ) : "crypto" . KeyPairSyncResult < string , string >
generate Key Pair Sync( type: "x25519" , options: "crypto" . X25519KeyPairOptions < "pem" , "der" > ) : "crypto" . KeyPairSyncResult < string , "buffer" . Buffer >
generate Key Pair Sync( type: "x25519" , options: "crypto" . X25519KeyPairOptions < "der" , "pem" > ) : "crypto" . KeyPairSyncResult < "buffer" . Buffer , string >
generate Key Pair Sync( type: "x25519" , options: "crypto" . X25519KeyPairOptions < "der" , "der" > ) : "crypto" . KeyPairSyncResult < "buffer" . Buffer , "buffer" . Buffer >
generate Key Pair Sync( type: "x25519" , options?: "crypto" . X25519KeyPairKeyObjectOptions ) : "crypto" . KeyPairKeyObjectResult
generate Key Pair Sync( type: "x448" , options: "crypto" . X448KeyPairOptions < "pem" , "pem" > ) : "crypto" . KeyPairSyncResult < string , string >
generate Key Pair Sync( type: "x448" , options: "crypto" . X448KeyPairOptions < "pem" , "der" > ) : "crypto" . KeyPairSyncResult < string , "buffer" . Buffer >
generate Key Pair Sync( type: "x448" , options: "crypto" . X448KeyPairOptions < "der" , "pem" > ) : "crypto" . KeyPairSyncResult < "buffer" . Buffer , string >
generate Key Pair Sync( type: "x448" , options: "crypto" . X448KeyPairOptions < "der" , "der" > ) : "crypto" . KeyPairSyncResult < "buffer" . Buffer , "buffer" . Buffer >
generate Key Pair Sync( type: "x448" , options?: "crypto" . X448KeyPairKeyObjectOptions ) : "crypto" . KeyPairKeyObjectResult
Generates a new asymmetric key pair of the given
type
. RSA, RSA-PSS, DSA, EC, Ed25519, Ed448, X25519, X448, and DH are currently supported.If a
publicKeyEncoding
orprivateKeyEncoding
was specified, this function behaves as ifkeyObject.export()
had been called on its result. Otherwise, the respective part of the key is returned as aKeyObject
.When encoding public keys, it is recommended to use
'spki'
. When encoding private keys, it is recommended to use'pkcs8'
with a strong passphrase, and to keep the passphrase confidential.The return value
{ publicKey, privateKey }
represents the generated key pair. When PEM encoding was selected, the respective key will be a string, otherwise it will be a buffer containing the data encoded as DER.