PHP WebShell

Текущая директория: /opt/BitGoJS/modules/sdk-lib-mpc/src

Просмотр файла: safePrime.ts

import { OpenSSL } from './openssl';

export async function generateSafePrime(bitlength: number, openSSLBytes: Uint8Array): Promise<bigint> {
  const openSSL = new OpenSSL();
  await openSSL.init(openSSLBytes);
  return openSSL.generateSafePrime(bitlength);
}

export async function generateSafePrimes(bitLengths: number[], openSSLBytes: Uint8Array): Promise<bigint[]> {
  const openSSL = new OpenSSL();
  await openSSL.init(openSSLBytes);
  const promises: Promise<bigint>[] = bitLengths.map((bitlength: number) => {
    return openSSL.generateSafePrime(bitlength);
  });
  return await Promise.all(promises);
}

Выполнить команду


Для локальной разработки. Не используйте в интернете!