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
Hello.
This is my code: var jsEngine = new Jint.Engine(); jsEngine.Execute(rsaBiJs); jsEngine.Execute(rsaJs); jsEngine.SetValue("modStr", modStr); jsEngine.SetValue("expStr", expStr); jsEngine.SetValue("password", UserPassword); jsEngine.Execute(@"var pubKey = RSA.getPublicKey( modStr, expStr );"); jsEngine.Execute(@"password = password.replace( /[^\x00-\x7F]/g, '' );"); jsEngine.Execute(@"var encryptedPassword = RSA.encrypt( password, pubKey );"); string encryptedPassword = jsEngine.GetValue("encryptedPassword").AsString();
Where: rsaJs is string whitch contents this script: https://steamstore.map2.ssl.hwcdn.net/public/javascript/crypto/rsa.js
rsaBiJs: https://steamstore.map2.ssl.hwcdn.net/public/javascript/crypto/jsbn.js
modStr and expStr are just strings. (Yes. Those have proper data in them).
It fails on this line: jsEngine.Execute(rsaBiJs);
The text was updated successfully, but these errors were encountered:
maybe encoding? Try UTF-8 encoding for the include files.
Hope this will help :)
Sorry, something went wrong.
So it actually fails on the first line of your code, loading https://steamstore.map2.ssl.hwcdn.net/public/javascript/crypto/jsbn.js, all the extra lines are unnecessary to reproduce. I will try that if you confirm.
Closing as obsolete.
No branches or pull requests
Hello.
This is my code:
var jsEngine = new Jint.Engine();
jsEngine.Execute(rsaBiJs);
jsEngine.Execute(rsaJs);
jsEngine.SetValue("modStr", modStr);
jsEngine.SetValue("expStr", expStr);
jsEngine.SetValue("password", UserPassword);
jsEngine.Execute(@"var pubKey = RSA.getPublicKey( modStr, expStr );");
jsEngine.Execute(@"password = password.replace( /[^\x00-\x7F]/g, '' );");
jsEngine.Execute(@"var encryptedPassword = RSA.encrypt( password, pubKey );");
string encryptedPassword = jsEngine.GetValue("encryptedPassword").AsString();
Where:
rsaJs is string whitch contents this script: https://steamstore.map2.ssl.hwcdn.net/public/javascript/crypto/rsa.js
rsaBiJs:
https://steamstore.map2.ssl.hwcdn.net/public/javascript/crypto/jsbn.js
modStr and expStr are just strings. (Yes. Those have proper data in them).
It fails on this line:
jsEngine.Execute(rsaBiJs);
The text was updated successfully, but these errors were encountered: