469,328 Members | 1,279 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,328 developers. It's quick & easy.

SHA1 Hash for Access/VBA

I've been looking for a SHA1 routine for an Access 2010 project. A Google search turns up quite a few for Visual Basic but not for current level vba.

This needs to be implemented entirely in Access vba - I'm trying not to call an external program (I can do it now with REST if I have to).

Can anyone point me to a source?

Thanks
Oct 21 '11 #1

✓ answered by patjones

I'm surprised that you did not find anything when you googled for SHA1 VBA. I recently updated from MD5 to SHA1 in one of my projects and I'm pretty sure I found it just by doing a google search. Maybe the one password-hash-function-for-excel-vba for instance...

12 18832
Rabbit
12,516 Expert Mod 8TB
Will SHA2 work? http://bytes.com/topic/access/insigh...m-vba-vbscript
Oct 21 '11 #2
patjones
931 Expert 512MB
Try this Insight article right here on our site: SHA2 Cryptographic Hash Algorithm for VBA and VBScript.
Oct 21 '11 #3
Thanks, guys, but in this environment I'm limited to SHA1.
Oct 21 '11 #4
NeoPa
32,181 Expert Mod 16PB
Great minds think alike it seems. I will avoid posting another link to the same article the others already have (They cross-posted so perfectly understandable they did).

What I would say though is that some VB code shouldn't be too complicated to translate into VBA. There are few real syntactic differences after all, even if available libraries may differ somewhat.
Oct 21 '11 #5
@NeoPa - you're right. I'm just a lazy SOB. ;)
Oct 21 '11 #6
Rabbit
12,516 Expert Mod 8TB
Well, SHA1 shares similarities with SHA2. I used the pseudocode from the wikipedia page to develop the VBS/VBA code in the article. You should be able to use the SHA1 pseudocode in the wikipedia page and do the same thing. And if you run into trouble, perhaps it's something I already handled in my SHA2 code. Or you could start with my SHA2 code and then transform it to SHA1.
Oct 21 '11 #7
@Rabbit. Thanks for the offer. I'll use REST for now, as I'm under time constraints. But when I have a gap, I'll give it a go and get back to you. J.
Oct 21 '11 #8
NeoPa
32,181 Expert Mod 16PB
RisoSystems:
@NeoPa - you're right. I'm just a lazy SOB. ;)
I can hardly argue with that sentiment. I believe {Insert your own term for creative power} gave me my intelligence primarily to help me avoid effort in life :-D
Oct 21 '11 #9
patjones
931 Expert 512MB
I'm surprised that you did not find anything when you googled for SHA1 VBA. I recently updated from MD5 to SHA1 in one of my projects and I'm pretty sure I found it just by doing a google search. Maybe the one password-hash-function-for-excel-vba for instance...
Oct 21 '11 #10
@zepp - Thanks! I'd found an earlier version of that which didn't work, and overlooked that one. Perfect.
Oct 21 '11 #11
ADezii
8,800 Expert 8TB
@RisoSystems:
Download the Attachment, and see if this is what you are looking for.
Attached Files
File Type: zip SHA1.zip (25.5 KB, 1551 views)
Oct 22 '11 #12
@ADezii - Thanks. Have already implemented the one Zepp suggested.
- as an aside - I've found this board more useful in 2 days than others I've looked at for months. I'm very appreciative.
Oct 22 '11 #13

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Elmo Mäntynen | last post: by
2 posts views Thread by Bryan Olson | last post: by
5 posts views Thread by Michael H | last post: by
reply views Thread by Dil via .NET 247 | last post: by
8 posts views Thread by Adam Carpenter | last post: by
2 posts views Thread by johnnyG | last post: by
2 posts views Thread by amygdala | last post: by
7 posts views Thread by php.developer2007 | last post: by
6 posts views Thread by LaundroMat | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Purva khokhar | last post: by
reply views Thread by haryvincent176 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.