der c1c3c2 转换工具

This commit is contained in:
cheney
2026-04-23 14:18:39 +08:00
parent f4228370d9
commit 3459a389ac
5 changed files with 255 additions and 8 deletions
+2 -2
View File
@@ -6,8 +6,8 @@ declare module 'sm-crypto' {
export const sm2: {
generateKeyPairHex: (privateKey?: string) => SM2KeyPair;
doEncrypt: (message: string, publicKey: string) => string;
doDecrypt: (ciphertext: string, privateKey: string) => string;
doEncrypt: (message: string, publicKey: string, cipherMode?: number) => string;
doDecrypt: (ciphertext: string, privateKey: string, cipherMode?: number, options?: { output?: string }) => string | Uint8Array;
doSignature: (message: string | Uint8Array, privateKey: string, options?: { hash?: boolean, der?: boolean, userId?: string, publicKey?: string, pointPool?: any[] }) => string;
doVerifySignature: (message: string | Uint8Array, signature: string, publicKey: string, options?: { hash?: boolean, der?: boolean, userId?: string }) => boolean;
getPublicKeyFromPrivateKey: (privateKey: string) => string;