move away from forge

This commit is contained in:
cupcakearmy 2019-04-08 20:14:02 +02:00
parent e808166a6d
commit 09a4ec5133

View File

@ -14,7 +14,7 @@ export default class RSA {
static gen = (size: number = 2 ** 12): Promise<KeyPair> => new Promise<KeyPair>((resolve, reject) => { static gen = (size: number = 2 ** 12): Promise<KeyPair> => new Promise<KeyPair>((resolve, reject) => {
// @ts-ignore // @ts-ignore
generateKeyPair('rsa', { generateKeyPair('rsa', {
modulusLength: 4096, modulusLength: size,
publicKeyEncoding: { type: 'pkcs1', format: 'pem' }, publicKeyEncoding: { type: 'pkcs1', format: 'pem' },
privateKeyEncoding: { type: 'pkcs1', format: 'pem' }, privateKeyEncoding: { type: 'pkcs1', format: 'pem' },
}, (err: string, pub: string, prv: string) => { }, (err: string, pub: string, prv: string) => {