o
k
q
u
e
s
t
i
o
n
s
.
c
o
m

[VB6] CryptoAPI MD5 Hash -

The attached project is a simple demonstration of using the Windows Crypto functions to create a hash. The example produces an MD5 hash of a file or a typed in string and returns it in hex.

It could easily be modified to return a Byte array of the hash, and could also easily perform an SHA1, etc. hash instead of MD5.

This can also be done easily via CAPICOM, which is a COM wrapper for the API calls used here. You can download CAPICOM from Microsoft if you don't have it installed, but this program doesn't use or require it.

There is some confusion around the use of these Crypto functions on Win9X. The documentation says Win95 OSR2 or later. Other people suggest you must have a recent version of the UnicoWS.dll installed first.

"Your mileage may vary."

 

CryptoAPI Issue -
Hey guys...I'm using the CryptoAPI to retrieve an md5 hash for my program. The program I'm using is to send and recieve files, and whenever it hashes and sends a file, it seems to crash with a ubound error. I'm thinking the API needs to use something similar to freefile(). Please le


CryptoAPI -
does anyone know where i can find a class or module that i can use in my vb app to interface with the CryptoAPI? I'm actually trying to encrypt a password so that it ends up the same as if i had encrypted it using Perls crypt() function?


I cant read from a Perl hash CGI -
I have a cgi that i am writing. In it i read a file into a hash. Then I try to access a record in the hash like this $newvariable = $hash{'key'}; what is strange is that when i do this on my computer just running a perl script it runs fine. When i do it on my web server as a cgi


[VB6] CryptoAPI MD5 Hash -
The attached project is a simple demonstration of using the Windows Crypto functions to create a hash. The example produces an MD5 hash of a file or a typed in string and returns it in hex. It could easily be modified to return a Byte array of the hash, and could also easily perfor


CryptoAPI -
Hey! I found the piece CryptoAPI sample code from PlanetSourceCode Anyone love encryption can take a look on it.


[resolved] [2005] securing an md5 hash -
hi, i need an advice. i am going to be using an md5 hash for login, BUT... i really need this to be secure. i could store that hash in an exe [write back to the program], but there's a problem there since it is possible to edit the program and replace the hash with a known one... what


CryptoAPI Problem. -
I am using a CryptoAPI class in my VB application. I have typed in all the code, but whenever I try to use "classCryptoAPI.GetExchangeKeyPair" it gives an error "Invalid Parameter". What's wrong? I have checked the whole program and variables. .................


Crypto API -
Has anyone written a class or control to simplify interaction with the cryptoAPI? I want to be able to: 1. Create and store new key pairs 2. Transfer Key pairs 3. Receive Keys 4. Sign/Hash/Encrypt files or objects 5. Verify and unencrpypt files or objects Once again I don't f


Make executable hash itself -
Hello, I would like an executable to hash itself when it starts and compare the hash with the hash it should be. If the hash isn't the same, then the application should close. The hashing itself is not a problem but how do I get the correct hash of the application and then later add


CAPICOM prerequitsites (RESOLVED) -
Hello everybody I want to use CAPICOM to digitally encrypt a password in my application. I know that CAPICOM is based on CryptoAPI. I have downloaded and installed the latest Microsoft SDK. Does this contain both the CAPICOM and CryptoAPI libraries? Also, in order to use CAPICOM wha


Hash Tables .... -
i have a project , about hash tables , i have to reference all courses in my university with credits etc .. and i am supposed to use Hash Tables ... the thing is i did not attend the lecture where the professor explained it ... and the book is horrible .. anyone has any idea where i c


[2005] MD5 hash of string -
I got a phpbb board running (on PHP/MySQL naturally). I want to use the phpbb user database for my own purposes. To be able to do so I need to compare the hash value the user enter against the stored hash value. I'm not able to coreectly compute the hash. I tried fiddling with


Hash password probabilities -
Still learning about how hashes work, so I don't know if this question even makes sense. As I understand it, it's possible for a hash to represent more than one combination of characters. Say I have an authentication system which verifies a user password based on a hash. Is there a ce


WinMX Hash Coding -
Got a question for anyone that can answer.. Well I was told the WinMX uses MD5 Checksum hashing but I tried using a few MD5 hash codes and resulted in diffrent hashs each time. Does anyone know what which hash code winmx uses? And if so, anywhere to a get a code (module or someth


CryptoAPI-Functions are missing -
hi, I have a little problem with the CryptoApi (or better with advapi.dll) shipped with WindowsNT When I try to access to the functions "CryptDuplicateKey" and "CryptDuplicateHash" I allways get an error, that the entrypoint was not found. So these functions ar


Question about hashing... -
If you hash a file, is there a way to unhash it? I have a class that uses the MD5 and SHA hash algorithms, and I just came up with an idea for a program that will hash any type of text file in Windows.


How to create a Hash -
I'd like to create the same hashes that windows does, i know it uses LM HASH and NT HASH. I'd like to know if there is any function or api to create the same hash that windows does. for exemple, this hash: 36c3363007203fd4aad3b435b51404ee was created for the password: 12ast89 i t


What is a hash table -
I've got a question. What is a hash table? I tried looking for the term in my VB.NET book (learn vb.net in 21 days) but it doesn't have anything on hash tables.


Need Help Getting SHA1 value of File -
I'm trying to write a routine to get the SAH1 hash value of graphics and video files. Can find lots of docs on how to hash a password but none on how to get the hash of a file. It appears that GetHashFromFile is what I need to use but I could use some example code. Am using VB.Net 20


reHash() produce weird result -
I have rehash() which working just fine. right before it goes out of the method. what it does is make a new hash which is basically an array that is 20 bigger than the old hash. I copied the value from one hash to another and it's working just fine. I even print them out after I did


Hash Table -
Hi All; I have a problem with hash table in the SQL server 2000. I can not read from it in both VB6 and VB.Net. I have a stored procedure in the SQL database and it create a hash table and fill with some data after some processes. After I run the stored from my application and try to


Case Sensitive Passwords (Hash) -
I have been using this article to create a password hash that I am saving into a MSSQL 2000 database. Everything seems to be working correctly, and cases are being stored along with the hash, however upon validating the passwords cases are not being taken into consideration. How


SHA1 Hash -
G'Day! Say for example a SHA1 Hash of poo.zip is: ea8d7a90372a331576e7a3ab20721085ad847d22 Is it possible to calculate the EXACT same hash without the file present using only the filename and/or size of the file? Cheers.


[02/03] Get md5 hash code in a running application. -
I've seen a code that could generate md5 hash code and tried it but the problem when you get the md5 hash code of running application it throws an exception that the file cannot be accessed because it is being used by another process. My question is how could I still retrieve the md5 h


trying to suppress OverflowException in hash calculation -
Hi I'm trying to mimc the java HashCode method as shwon below. . I’m not able to suppress overflowexception in VB so the value does’nt match exactly what I get in Java. For example, hash'ing the string “test” and it matches java version. But hash “tester” and the 4-b


How to calculate MD5 hash of current vb6 .exe on runtime -
Hi all. I wonder how i calculate MD5 hash of current vb6 exe on runtime ? I want to do integrity check with a MD5 hash during run time and send that value for server for checking. could any one show me how this can be done?Thanks


how to supress OverflowException -
Hi I'm trying to mimc the java HashCode method as shon below. . I’m not able to suppress overflowexception in VB so the value does’nt match exactly what I get in Java. For example, hash'ing the string “test” and it matches java version. But hash “tester” and the 4-byte


Salted Hash -
Does VB6 have any inbuilt functionality to generate a salted hash? I want to use this to generate a password. So I will be supplied a password and the code will return a salted hash which I will be storing in the registry. Any ideas?


Hash function -
I was testing the Hash function today. And I read here http://il2.php.net/manual/en/function.hash.php If I set the parameter $raw_output=true the function will return a binary rows instead of hexits values. But when I try it it returns a strange characters instead of binary value


hash functions -
vb guru's how can i hash 20 names into 30 locations, and count number of collisions using entire name as key.


Hash code question -
Hi all, If you convert a string to a hash code using the GetHashCode() method, how do you convert the Hash code value back to a string?? I did this to encrypt a password. Any ideas??


Storing End-User Passwords In SQL Server Tables -
I am building a web application using SQL Server and VBScript ASPs. I would normally use CAPICOM to hash the passwords and store them in a user table. When the user wants to log in, I hash the string he supplied during the challenge and compare it to the value stored in the DB. Th


Creating SHA1 hash from text... -
Hello I'm trying to generate a SHA1 hash from a given string. I used the search thingy, found a few methods, but none of them seemed to work on VB 2008 Express Thanks to anyone who can help and explain how to generate a SHA1 hash from a given string of text.


Make md5 Hash -
I'm trying to make a md5 hash in vb, for example, I'm making a security scheme and want to make a md5 hash of say a hard drive serial within vb. But in all honestly, I've tried looking for md5 functions but cannot find one I'm after that accurately hashes a string Note: I found o


hashing and comparing -
in few of lines of code, 1. how can i hash a strPasswd, and 2. compare it to see if it matches a textbox value (when user enters password, it will be compared to the hash in the db)


Hash code -
i know hash code it creates a fixed-length array of bytes given a block of data of any length. More importantly, the hash code generated is mathematically guaranteed to be random and unique and not particularly affine to the data. so where can i apply this to my application for e


Fill a dataset from a SQL table with a binary field. -
How can I do this? It gives me an error saying: Inconvertable type mismatch between SourceColumn 'Hash' of Byte[] and the DataColumn 'Hash' of String. KT


Hash table object -
I'm implementing a hash table in my program. Where can I find the hash table object in vb?


Password Encryption (Nearly Closed, Advice is Nice) -
I need to build a VBScript ASP application that has secure logins over SSL. My first task is to figure out how to encrypt the user passwords. I figured a simple MD5 hash. After two hours of hunting, I've found dozens of roll-your-own VBScript and JavaScript MD5 routines, but no do


Hash Table Key = hash code or value passed -
Hello, Given the following pseudo code: dim myHashtable as new hashtable myHashtable.Add("any_long_string_1", vbNull) myHashtable.Add("any_long_string_2",vbNull) (repeat 250,000 times, seriously) --When the hash table items are dumped out using an enum