Creating SHA Encrypted Values

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

SirWobbyTheFirst
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 239
Joined: Tue Jun 30, 2009 11:15 pm

Creating SHA Encrypted Values

Post by SirWobbyTheFirst » Tue Feb 28, 2012 9:57 pm

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.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Creating SHA Encrypted Values

Post by Mark » Thu Mar 01, 2012 12:01 pm

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
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3975
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Creating SHA Encrypted Values

Post by bn » Thu Mar 01, 2012 1:11 pm

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

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Creating SHA Encrypted Values

Post by Mark » Thu Mar 01, 2012 1:19 pm

Nice, Bernd. I had a different library in mind and I forgot about this one.

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

SirWobbyTheFirst
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 239
Joined: Tue Jun 30, 2009 11:15 pm

Re: Creating SHA Encrypted Values

Post by SirWobbyTheFirst » Thu Mar 01, 2012 2:54 pm

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.

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3975
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Creating SHA Encrypted Values

Post by bn » Thu Mar 01, 2012 3:32 pm

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

SirWobbyTheFirst
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 239
Joined: Tue Jun 30, 2009 11:15 pm

Re: Creating SHA Encrypted Values

Post by SirWobbyTheFirst » Thu Mar 01, 2012 3:39 pm

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.

adventuresofgreg
Posts: 349
Joined: Tue Oct 28, 2008 1:23 am
Contact:

Re: Creating SHA Encrypted Values

Post by adventuresofgreg » Fri Oct 02, 2015 2:04 pm

Thank you Mark Smith! You just saved me countless hours trying to code this myself. (I sent a PayPal donation).

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9801
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Creating SHA Encrypted Values

Post by FourthWorld » Fri Oct 02, 2015 7:58 pm

Tragically, Mark Smith passed away a few years ago. He was a great coder and talented musician, and is sorely missed.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

adventuresofgreg
Posts: 349
Joined: Tue Oct 28, 2008 1:23 am
Contact:

Re: Creating SHA Encrypted Values

Post by adventuresofgreg » Fri Oct 02, 2015 7:59 pm

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.

ctflatt
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 243
Joined: Sun Dec 06, 2009 12:24 am
Location: Fredericktown, MO
Contact:

Re: Creating SHA Encrypted Values

Post by ctflatt » Thu Mar 02, 2017 11:25 am

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!

SparkOut
Posts: 2834
Joined: Sun Sep 23, 2007 4:58 pm

Re: Creating SHA Encrypted Values

Post by SparkOut » Thu Mar 02, 2017 10:39 pm

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.

ctflatt
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 243
Joined: Sun Dec 06, 2009 12:24 am
Location: Fredericktown, MO
Contact:

Re: Creating SHA Encrypted Values

Post by ctflatt » Thu Mar 02, 2017 10:52 pm

Sure thing!

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9801
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Creating SHA Encrypted Values

Post by FourthWorld » Thu Mar 09, 2017 10:41 pm

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
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

SirWobbyTheFirst
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 239
Joined: Tue Jun 30, 2009 11:15 pm

Re: Creating SHA Encrypted Values

Post by SirWobbyTheFirst » Fri Mar 10, 2017 11:40 pm

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.

Post Reply

Return to “Databases”