Hi,
I am using Servoy 3.5.7 and I need to implement a method that does a SHA-1 hashing algorithm. It2be cryptor plugin only has SHA crypting method. I red that i need to install an SHA-1 module on the server,is that true for Servoy also? Has any of you done this before?
Many thanks in advance for the answers!
DB
Java VM is supossed to have a class that does it. I do not know how to access from Servoy.
Check an example at http://www.anyexample.com/programming/j … 1_hash.xml
I’ve had good experiences using algorithms from this site:
http://www.webtoolkit.info/javascript-sha256.html
I like the 256 better, but there’s a SHA-1 on there if need be. You just copy all of the code into your globals.js if you are using servoy 4. In servoy 3 it would be a little harder as you’d have to create every single method. And lastly I just changed the code to use my own conventions and to use the servoy arguments array instead of parameters and it works like a charm. I haven’t had a collission yet.
About a year ago I did a small article on MD5 hashes here:
http://java-servoy.blogspot.com/2008/03/java-how-to-3-creating-md5-hashes.html#comments
Although originally for MD5 hash all one has to do is replace the “MD5” with “SHA1” and you have that kind of hash instead.
My code is in Javascript, calling the appropriate Java classes. This might be easier than starting afresh.
I have not tested with the SHA1 so if you use it can you post a response please. ![Smile :)]()
Hope this helps.