RSA Encryption In OB
-
Heyo Im Getting Error
<--- Executing Block FUNCTION ---> ERROR: Bad Data.
When Im Trying To Encrypt Pass With RSA.
Here Is The Loli Script
PARSE "<SOURCE>" LR "rsa.setPublic(\"" "\"" -> VAR "modulus" FUNCTION RSAEncrypt "<modulus>" "10001" RsaOAEP=FALSE "<PASS>" -> VAR "EPASS"
Anyone Have Idea?
-
Yes, RSAEncrypt only takes Base64 values as input.
But by seeing what you parse and what your modulus is, i assume you'd be happier by using RSAPKCS1PAD2
Btw: this one doen't need base64 input - yo can use it just like the old function named RSA from older OB Versions.
-
@meinname sorry for late reply but but can i use hex values? because when i read js ... it converts b64 to hex but still i have doubt for exponent that it should be converted into b64 then to hex or directed hex...
-
RSAPKCS1PAD2 accepts hex
-
@Ruri thanks ruri!
-
@Ruri any way to convert var into hexidecimal?
-
what do you mean by "var"? what is your starting type? anyways look in the UTILITY Convert block
-
var as variable... which has string! i have looked into UTILITY Convert block.. there is hex only!
-
You can convert UTF8/ASCII to HEX i think
-
alredy tried
-
There is option for HEX not HEXIDECIMAL!
-
It's the same thing...