Skip to content

Commit

Permalink
genRSAAndEd25519KeyPairではキーを直列に生成する?
Browse files Browse the repository at this point in the history
  • Loading branch information
tamaina committed Jul 17, 2024
1 parent 57bfffe commit d0aada5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/backend/src/misc/gen-key-pair.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
import { genEd25519KeyPair, genRsaKeyPair } from '@misskey-dev/node-http-message-signatures';

export async function genRSAAndEd25519KeyPair(rsaModulusLength = 4096) {
const [rsa, ed25519] = await Promise.all([genRsaKeyPair(rsaModulusLength), genEd25519KeyPair()]);
const rsa = await genRsaKeyPair(rsaModulusLength);
const ed25519 = await genEd25519KeyPair();
return {
publicKey: rsa.publicKey,
privateKey: rsa.privateKey,
Expand Down

0 comments on commit d0aada5

Please sign in to comment.