PHP WebShell

Текущая директория: /usr/lib/node_modules/bitgo/node_modules/@bitgo/sdk-core/dist/src/bitgo/trading/network

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

/**
 * Provided an X.509/ OpenSSL PEM public key, and a string of text to encrypt,
 * This function will
 * 1. Generate a random 256-bit key
 * 2. Encrypt the text using AES-GCM with the generated key
 * 3. Encrypt the generated key using RSA-OAEP with the provided public key
 * 4. Return the encrypted key and the encrypted text in the format `${encryptedKey}\n${encryptedText}`
 *
 * @param {string} publicKey - RSA Public Key
 * @param {string} text - text to encrypt
 * @returns {string} The encrypted text
 *
 * @example
 * const publicKey = '-----BEGIN PUBLIC KEY-----\n.....\n-----END PUBLIC KEY-----';
 * const text = 'This text contains sensitive information';
 * const encrypted = await encryptRsaWithAesGcm(publicKey, text);
 */
export declare function encryptRsaWithAesGcm(publicKey: string, text: string): Promise<string>;
/**
 * Provided an X.509/ OpenSSL PEM public key, and a string of text to encrypt,
 * This function will
 * 1. Generate a random 256-bit key
 * 2. Encrypt the text using AES-GCM with the generated key
 * 3. Encrypt the generated key using RSA-OAEP with the provided public key
 * 4. Return the encrypted key and the encrypted text in the format `${encryptedKey}\n${encryptedText}`
 *
 * @param {string} publicKey - RSA Public Key
 * @param {string} text - text to encrypt
 * @returns {string} The encrypted text
 *
 * @example
 * const publicKey = '-----BEGIN PUBLIC KEY-----\n.....\n-----END PUBLIC KEY-----';
 * const text = 'This text contains sensitive information';
 * const encrypted = await encryptBrowserRsaWithAesGcm(publicKey, text);
 */
export declare function encryptBrowserRsaWithAesGcm(publicKey: string, text: string): Promise<string>;
//# sourceMappingURL=encrypt.d.ts.map

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


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