mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-28 22:49:24 +09:00
use Promise.all in genRSAAndEd25519KeyPair
This commit is contained in:
parent
c7eed1c360
commit
6a56aea422
@ -6,8 +6,7 @@
|
|||||||
import { genEd25519KeyPair, genRsaKeyPair } from '@misskey-dev/node-http-message-signatures';
|
import { genEd25519KeyPair, genRsaKeyPair } from '@misskey-dev/node-http-message-signatures';
|
||||||
|
|
||||||
export async function genRSAAndEd25519KeyPair(rsaModulusLength = 4096) {
|
export async function genRSAAndEd25519KeyPair(rsaModulusLength = 4096) {
|
||||||
const rsa = await genRsaKeyPair(rsaModulusLength);
|
const [rsa, ed25519] = await Promise.all([genRsaKeyPair(rsaModulusLength), genEd25519KeyPair()]);
|
||||||
const ed25519 = await genEd25519KeyPair();
|
|
||||||
return {
|
return {
|
||||||
publicKey: rsa.publicKey,
|
publicKey: rsa.publicKey,
|
||||||
privateKey: rsa.privateKey,
|
privateKey: rsa.privateKey,
|
||||||
|
Loading…
Reference in New Issue
Block a user