UNPKG

@blueking/crypto-js-sdk

Version:

crypto-js-sdk

53 lines (52 loc) 2.17 kB
/// <reference types="node" /> import SM2 from './sm2/index'; import { encrypt, decrypt, createIV } from './sm4'; declare const _default: { SM2: typeof SM2; sm4: { encrypt: typeof encrypt; decrypt: typeof decrypt; createIV: typeof createIV; }; helper: { encode: { bufToHex(buf: number[] | Uint8Array | Buffer): string; numToHex(d: number): string; _binToHex(binStr: string): string; strToHex(str: string): string; hexToBuf(hexStr: string): number[] | Uint8Array | Buffer; _hexToBin(hexStr: string): string; hexToStr(hexStr: string): string; hexToBase64(hexStr: string): string; bufToBase64(buf: Uint8Array): string; strToBase64(str: string): string; urlBase64ToBase64(u64: string): string; base64ToUrlBase64(b64: string): string; _base64ToBin(b64: string): string; base64ToBuf(b64: string): number[] | Buffer; base64ToStr(b64: string): string; bufToUrlBase64(buf: Uint8Array): string; strToUrlBase64(str: string): string; base64ToHex(b64: string): string; bufToBin(buf: number[] | Uint8Array | Buffer): string; strToBin(str: string): string; binToBuf(binStr: string): number[] | Buffer; strToBuf(str: string): number[] | Buffer; binToStr(binStr: string): string; bufToStr(buf: number[] | Uint8Array | Buffer): string; }; byte: { arrayCopy: typeof import("./helper/byte").arrayCopy; longToByte: typeof import("./helper/byte").longToByte; intToByte: typeof import("./helper/byte").intToByte; intArrayToByteArray: typeof import("./helper/byte").intArrayToByteArray; byteToInt: typeof import("./helper/byte").byteToInt; byteArrayToIntArray: typeof import("./helper/byte").byteArrayToIntArray; }; asn1: { decode: (str: string) => string; }; Buffer: BufferConstructor; }; }; export default _default;