sha-1

Why would HMAC SHA-1 return a different digest with the same input?

I am trying to build a working encrypted signature for the Amazon S3 web service, writing a connection library using Objective C. I have run into HMAC SHA-1 digest problems with the ObjC code, so I'm putting that to the side and looking at existing, working Perl code, to try to troubleshoot digest creation. I am testing HMAC SHA-1 dig...

HMACSHA1.ComputeHash() thread-safety question

hello, i am asking myself if it would be dangerous on a asp.net page´s codebehind to use an static (Shared) variable which holds an HMACSHA1-instance. the problem is that the same HMACSHA1-instance would be used by all the asp.net worker-process´ threads when processing multiple simultaneous requests on the same asp.net-page. all (HMAC...

Significance of Hex numbers specified in RFC 3174 (SHA-1)

I'm trying to learn about SHA-1, I was looking at the C implementation that was included in the specification (RFC 31741) and this part confuses me: context->Intermediate_Hash[0] = 0x67452301; context->Intermediate_Hash[1] = 0xEFCDAB89; context->Intermediate_Hash[2] = 0x98BADCFE; context->Intermediate_Hash[3] = 0x10325476; cont...

why these two sources calculate different sha-1 sums

The following snippets are both supposed to calculate sha-1 sum. But for the same file they calculate different sha-1 sums. //snippet1 byte[] byteArr = new byte[(int) uploadedFile.getLength()]; try { stream = new BufferedInputStream(uploadedFile.getInputStream()); stream.read(byteArr); stream.close(); } catch (IOException e) { e.p...

SHA-1 hash for storing Files

After reading this, it sounds like a great idea to store files using the SHA-1 for the directory. I have no idea what this means however, all I know is that SHA-1 and MD5 are hashing algorithms. If I calculate the SHA-1 hash using this ruby script, and I change the file's content (which changes the hash), how do I know where the file i...

SHA-1 MessageDigest not available

I have searched and searched and searched. I cannot seem to download the Google APIs using the Android SDK and AVD manager. It's driving me nuts! I get the subject title message as an error: SHA-1 MessageDigest not available My PATH var JAVA_HOME=C:\Program Files\Java\jre6\bin Any thoughts? Thanks! ...

A 16-digit hashing function

Is there a hash function that returns a 16-digit hex value (as MD5 returns 32-digit), or is there a library (for C++) in which I can use MD5 or SHA-1 which returns a 16-digit value ...

SHA-1 and Unicode

Hi everyone, Is behavior of SHA-1 algorithm defined for Unicode strings? I do realize that SHA-1 itself does not care about the content of the string, however, it seems to me that in order to pass standard tests for SHA-1, the input string should be encoded with UTF-8. ...

Lua library/wrapper for cryptography

Hi, I'm looking for a library or wrapper for Lua to use some cryptographic functions. Initially I only need to create SHA-1 hashs. Any tips or suggestion are appreciated. ...

Why a different SHA-1 for the same file under windows or linux?

Why on the same machine computing the SHA-1 hash of the same file produces two completely different SHA-1 hashes in windows and inside a msysgit Git bash? Doesn't the SHA-1 algorithm was intended to produce the same hash for the same file in all OSes? On windows (with HashCheck): File hello.txt 22596363b3de40b06f981fb85d82312e8c0ed511...