Open nhosseinzadeh opened 1 year ago
Hi, What do you mean by HEX encryption?
Hi, i mean ASCII String to HEX and Decimal number to HEX
The SHA family is more than a 15min job, so its not going to happen anytime soon. But I implemented a mostly working version of ASCII to base16. Check out the "class" and see if you can contribute the decode function :)
##string to encode in base16 /hexadecimal
:local myStr "My string";
/import flash/MTM/Facts.rsc;
:global MtmFacts;
:local toolObj [($MtmFacts->"get") "getTools()->getEncoding()->getBase16()"];
:put ([($toolObj->"encode") $myStr]); #4D7920737472696E67
You just copied my concept, not the working Base64 function... I have finished both encoding and decoding, if you want to copy them you can find them in the usual place. https://forum.mikrotik.com/viewtopic.php?p=988931#p988931
@rextended Hi,I was gathering notes on base64 and saw your example. You are right its not ready, nor pulled out as a factory method yet.
But, if i have your permission I would love to port your functions to MTM, with proper attribution of course.
No problems.
It's also present the decode function.
@rextended
Did not have time to fully understand the opts you handle, so the initial version does not include them. https://github.com/merlinthemagic/MTM-RouterOS-Scripting/blob/main/src/v7/flash/MTM/Tools/Encoding/Base64.rsc
Let me know if you want the attribution to say something different.
No, it's ok. For the options... are optionals ;)
hello, could please add the SHA256 hashing function and also HEX encryption to this amazing repository for ROS 7? thanks for sharing your works