@bxjs/base
Version:
22 lines (19 loc) • 863 B
TypeScript
import * as __M__ from 'typeorm'
declare global {
namespace xcrypto {
function aes256_encrypt(key: string, data: string): string
function aes256_decrypt(key: string, data: string): string
// 密码内容加密
function password_encrypt(content: string): string
// 比较输入的密码内容与数据库中加密的内容是否一致
function password_compare(content: string, encrypted_content: string): boolean
// case1: 私钥加密
function rsa_private_encrypt(private_key, content): string
// case1: 公钥解密
function rsa_public_decrypt(public_key, content): string
// case2: 公钥加密
function rsa_public_encrypt(public_key, content): string
// case2: 私钥解密
function rsa_private_decrypt(private_key, content): string
}
}