24 lines
1.1 KiB
TypeScript
24 lines
1.1 KiB
TypeScript
declare function hmac(input: any, key: any, out: any): string;
|
|
declare function genRandomString(length: any): string;
|
|
declare function sha512(password: string, salt: string): {
|
|
salt: string;
|
|
passwordHash: string;
|
|
};
|
|
declare function sha1(str: string): string;
|
|
declare function hmacSha256(str: string, key: any): string;
|
|
declare function md5(str: string): string;
|
|
declare function createSign(secretKey: string, paramStr: string, timestamp: number): string;
|
|
declare function checkSign({ secretKey, data, sign, signKeys, }: {
|
|
secretKey: string;
|
|
data: {};
|
|
sign: string;
|
|
signKeys: string[];
|
|
}): boolean;
|
|
declare const aesEncrypt: (plaintText: any, key: any) => any;
|
|
declare const aesDecrypt: (encryptedDataHexStr: any, key: any) => any;
|
|
declare const hexToBase58: (hexString: string) => string;
|
|
declare const base58ToHex: (base58String: string) => string;
|
|
declare const hexToBase32: (hexString: string) => string;
|
|
|
|
export { aesDecrypt, aesEncrypt, base58ToHex, checkSign, createSign, genRandomString, hexToBase32, hexToBase58, hmac, hmacSha256, md5, sha1, sha512 };
|