Page 1 of 2

Creating SHA Encrypted Values

Posted: Tue Feb 28, 2012 9:57 pm
by mickpitkin92
Greetings all, my house mate and me are upgrading the website from a dull XHTML 1.1 and CSS3-ish website to a fully featured, PHP, jQuery, CSS3, HTML5 and MySQL based website which will feature a few MySQL based portions and as part of this I am upgrading my old SDK software so that it supports MySQL and thus my SDK needs to be able to logon to my "Trusted Devs" system and whilst my house mate is quite fluent in web dev, I am not therefore I am sticking with the LiveCode side of things.

One of the requirements, is that the authentication system will be using SHA based encryption, either 256 or 512 based on what you guys so, so I was wondering if there was anyway for Rev/LC to generate a SHA512 or SHA256 hash of data so that I can use it in my plugin.

Any help would be much appreciated, until a reply is met I'm going to begin looking at getting a connection to the DB established in the first place and working with it.

Regards, Mich.

Re: Creating SHA Encrypted Values

Posted: Thu Mar 01, 2012 12:01 pm
by Mark
Hi,

I'm sure that a SHA library exists, but it is no longer available from the website where it used to be. I should have it somewhere on a DVD but no idea where the DVD is.

You could also use a command line utility.

Kind regards,

Mark

Re: Creating SHA Encrypted Values

Posted: Thu Mar 01, 2012 1:11 pm
by bn
Hi Mick, Mark,

I think the library is here:

http://marksmith.on-rev.com/revstuff/

there are some encryption libraries, probably libHash-HMAC

No idea what is what...

Kind regards

Bernd

Re: Creating SHA Encrypted Values

Posted: Thu Mar 01, 2012 1:19 pm
by Mark
Nice, Bernd. I had a different library in mind and I forgot about this one.

Mark

Re: Creating SHA Encrypted Values

Posted: Thu Mar 01, 2012 2:54 pm
by mickpitkin92
Oh thank you so much Bernd, I could honestly kiss you, that site is definitely getting bookmarked. Development of the SDK can continue now thanks to you kind sir.

Your new admirer, Mich.

Re: Creating SHA Encrypted Values

Posted: Thu Mar 01, 2012 3:32 pm
by bn
Hi Mich,

thank you. But the thanks go to Mark Smith, a british musician, bass player and extremely talented coder. Unfortunately he passed away 2 years ago but fortunately his site is still online.

Kind regards

Bernd

Re: Creating SHA Encrypted Values

Posted: Thu Mar 01, 2012 3:39 pm
by mickpitkin92
Oh dear, well his work has helped contribute to the continuity of whats going to be many of my projects, this library is huge I'm looking through the code that does MD5 and SHA256 encryption now and its like WOW!!!

I hope others can find use out of his work, is it possible to get a sticky going, just to show this as the work he has done and contribute to an RIP page? I might be being a bit intrusive however I feel it would be a nice gesture for anyone who is helped to contribute an RIP message, just in the case that his friends and family stumble upon the page and of course its entirely up to the board admins and is simply a suggestion.

Regards, Mich.

Re: Creating SHA Encrypted Values

Posted: Fri Oct 02, 2015 2:04 pm
by adventuresofgreg
Thank you Mark Smith! You just saved me countless hours trying to code this myself. (I sent a PayPal donation).

Re: Creating SHA Encrypted Values

Posted: Fri Oct 02, 2015 7:58 pm
by FourthWorld
Tragically, Mark Smith passed away a few years ago. He was a great coder and talented musician, and is sorely missed.

Re: Creating SHA Encrypted Values

Posted: Fri Oct 02, 2015 7:59 pm
by adventuresofgreg
FourthWorld wrote:Tragically, Mark Smith passed away a few years ago. He was a great coder and talented musician, and is sorely missed.
GOSH! I'm sorry, I didn't know.

Re: Creating SHA Encrypted Values

Posted: Thu Mar 02, 2017 11:25 am
by ctflatt
Greetings to you all,

Would it be possible for someone to write out step-by-step how to implement this for a non-programmer. Don't get me wrong, I am not completely new to this, but implementing something like this is beyond me--I do not know where to start, and I have a current project that needs to generate an SHA512 hash to post as a header to a web service.

Any help/direction/instruction would be greatly appreciated.

Thanks!

Re: Creating SHA Encrypted Values

Posted: Thu Mar 02, 2017 10:39 pm
by SparkOut
Could you please start a new thread to give more details of what service and values you need to use, Oauth 1/Oauth 2, RESTful api, session authentication etc so we can give more specific help.

Re: Creating SHA Encrypted Values

Posted: Thu Mar 02, 2017 10:52 pm
by ctflatt
Sure thing!

Re: Creating SHA Encrypted Values

Posted: Thu Mar 09, 2017 10:41 pm
by FourthWorld
FWIW there's been some great progress on a new messageDigest function for LiveCode Script which will support SHA2 and SHA3 in addition to MD5 and SHA1. It's in review now, and may be available as early as v9 DP7 - you can follow the progress on this at Github:
https://github.com/livecode/livecode/pull/5229

Re: Creating SHA Encrypted Values

Posted: Fri Mar 10, 2017 11:40 pm
by mickpitkin92
I'm looking forward to seeing the messageDigest function get updated, hopefully it will have some clear documentation to help users figure out the correct syntax to generate say a SHA3 hash or other hash types.