We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
let keypair = sm2.generateKeyPairHex(); let publicKey = keypair.publicKey; // 公钥 let privateKey = keypair.privateKey; // 私钥 const cipherMode = 0; // 1 - C1C3C2,0 - C1C2C3,默认为1 let buf = Buffer.alloc(1); let encryptData = sm2.doEncrypt(buf.toString(), publicKey, cipherMode); // 加密结果 let dec = sm2.doDecrypt(encryptData, privateKey)
上述代码无法解密。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
let keypair = sm2.generateKeyPairHex();
let publicKey = keypair.publicKey; // 公钥
let privateKey = keypair.privateKey; // 私钥
const cipherMode = 0; // 1 - C1C3C2,0 - C1C2C3,默认为1
let buf = Buffer.alloc(1);
let encryptData = sm2.doEncrypt(buf.toString(), publicKey, cipherMode); // 加密结果
let dec = sm2.doDecrypt(encryptData, privateKey)
上述代码无法解密。
The text was updated successfully, but these errors were encountered: