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
'use strict' const nodeRsa = require('node-rsa') let privatePem = '私钥' let publicPem = '公钥' let text = '欲加密文本' let publicKey = new nodeRsa(publicPem); let privateKey = new nodeRsa(privatePem); publicKey.setOptions({encryptionScheme: 'pkcs1'}); privateKey.setOptions({encryptionScheme: 'pkcs1'}); let encrypted = publicKey.encrypt(text, 'base64') // iTGJGi3YWjPqrlTASjA+dB7oRwSYO50nToxkuSe+7dzZ6eC2uQE0tGk2TV+ouj9FDwdUmc/5yMBKP4Bvyan0+08yGlnl6yQMwvlQ0CagTwdzxdstMjfAReLC4JANcodW/+zB6H3K64WpLCRuQB0m0Ss1IxygM3I2Ut27gnlFhjY= var decrypted = privateKey.decrypt(encrypted, 'utf8')
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: