473,836 Members | 1,452 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SHA1 Hash for Access/VBA

11 New Member
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
12 20625
Rabbit
12,516 Recognized Expert Moderator MVP
Will SHA2 work? http://bytes.com/topic/access/insigh...m-vba-vbscript
Oct 21 '11 #2
patjones
931 Recognized Expert Contributor
Try this Insight article right here on our site: SHA2 Cryptographic Hash Algorithm for VBA and VBScript.
Oct 21 '11 #3
RisoSystems
11 New Member
Thanks, guys, but in this environment I'm limited to SHA1.
Oct 21 '11 #4
NeoPa
32,584 Recognized Expert Moderator MVP
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
RisoSystems
11 New Member
@NeoPa - you're right. I'm just a lazy SOB. ;)
Oct 21 '11 #6
Rabbit
12,516 Recognized Expert Moderator MVP
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
RisoSystems
11 New Member
@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,584 Recognized Expert Moderator MVP
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 Recognized Expert Contributor
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

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

Similar topics

2
3416
by: Elmo Mäntynen | last post by:
I know how to make a hash(using mhash), but instead of encoded as hex I want it in base32 for use with the bitzi catalog. python-bitzi is useful but way too slow for just getting the hash of a file(am going to use it elsewhere). Thanks. Elmo
2
3798
by: Bryan Olson | last post by:
The current Python standard library provides two cryptographic hash functions: MD5 and SHA-1 . The authors of MD5 originally stated: It is conjectured that it is computationally infeasible to produce two messages having the same message digest. That conjecture is false, as demonstrated by Wang, Feng, Lai and Yu in 2004 . Just recently, Wang, Yu, and Lin showed a short- cut solution for finding collisions in SHA-1 . Their result
10
8215
by: Clint | last post by:
Hey all - I'm having a really confusing problem concerning a web service. Right now, I have an application that needs to call a web service that does nothing but return "true" (this will obviously change once the program's fully built to actually do something, but for testing, it works). The only code I added to the service is below:
5
7212
by: Michael H | last post by:
Hi all, I guess I don't fully understand how a SHA1 hash value is calculated in C# / .NET for a large file... I'm trying to calculate SHA1 values for large files that are much larger than my physical main memory. It seems the way to derive a SHA1 value involves opening a file stream to the large file, passing it to a byte array, and passing the byte array to the .NET hash method. Does this load the entire file into main memory (within...
0
5287
by: Dil via .NET 247 | last post by:
Fresher to .NET Aiming to produce a resulting hash of length 24 CHARACTERS, using MD5 or SHA1 Algorithms. According to the Class Libraries, the hash size for the SHA1 algorithm is 160 bits, and 128 bits for MD5. After generating the hash, I convert the byte result to a base64 String, and my resulting hash lengths are as below: MD5 - 24 characters SHA1 - 28 Characters
8
43298
by: Adam Carpenter | last post by:
Hello, I have my users passwords stored to my DB hashs created using SHA1CryptoServiceProvider, here is the function: Public Shared Function EncryptPassword(ByVal password As String) As Byte() Dim encoding As New UnicodeEncoding() Dim hashBytes As Byte() = encoding.GetBytes(password) ' Compute the SHA-1 hash Dim sha1 As New SHA1CryptoServiceProvider()
2
3716
by: johnnyG | last post by:
Greetings, I'm studying for the 70-330 Exam using the MS Press book by Tony Northrup and there are 2 side-by-side examples of using the SHA1CryptoServiceProvider to create a hash value from a string. The vb example outputs "A94A8FE5CCB19BA61C4C0873D391E987982FBBD3" The cs example outputs "5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8" for the string "password" Question: do the 2 applications use different automatic "salts" or "seeds" to...
2
3207
by: amygdala | last post by:
Hi, Does anybody now of a custom crypt function that implements sha1? The thing I like about crypt is that I don't have to worry about (re)generating salt when querying the database. Or are there perhaps other functions that implements this same functionality and generates a sha1 hash? Cheers.
7
9758
by: php.developer2007 | last post by:
I want to know to decode sha1 encoded url into normal url. Example www.example.com/<sha1 code>/index1.htm I want this to www.example.com/index1.htm
6
11388
by: LaundroMat | last post by:
Hi - I'm trying to calculate unique hash values for binary files, independent of their location and filename, and I was wondering whether I'm going in the right direction. Basically, the hash values are calculated thusly: f = open('binaryfile.bin') import hashlib
0
9816
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9668
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10546
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10588
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10254
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9371
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5647
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5823
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3112
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.