mirror of
https://github.com/Myzel394/kleckrelay-website.git
synced 2025-06-18 15:35:26 +02:00
14 lines
384 B
TypeScript
14 lines
384 B
TypeScript
import {SerializedKeyPair, generateKey} from "openpgp"
|
|
|
|
export default async function generateKeys(): Promise<
|
|
SerializedKeyPair<string> & {revocationCertificate: string}
|
|
> {
|
|
return generateKey({
|
|
type: "ecc",
|
|
format: "armored",
|
|
userIDs: [{name: "John Smith", email: "john@example.com"}],
|
|
passphrase: "",
|
|
rsaBits: process.env.NODE_ENV === "production" ? 4096 : 2048,
|
|
})
|
|
}
|