PHP appears to be giving different hash values when I use php -r <code> on the command line and when I execute the file with php <file>, php -f <file>, or run the code inside Apache.
For instance, a SHA1 usage on command line using -r:
$ php -r "print sha1('$1S*90');"
77cd8b48ceca53e018f80536b0a44c5b6710425f
When I try the same with ...
I am trying to digitally sign requests made by a mobile client running J2ME and want to verify the signature by the .Net Framework.
Does anyone know if the implementations
DSACryptoServiceProvider //.Net
and
Signature.getInstance("SHA1withDSA", "SUN") //Java
are compatible? Or does anyone have a better idea?
After some resea...
I'm confused as to why the following return separate sHA1s
$ perl -MDigest::SHA1 -E'say Digest::SHA1::sha1_hex("http://i.aultec.com/v/8066/Originals/1FTVX12585NA9832010.jpg");'
e1133fa3b7ea0bfb8ffa4d877932ed6c6fa10cef
$ echo "http://i.aultec.com/v/8066/Originals/1FTVX12585NA9832010.jpg" | sha1sum
5c3731e83ae0184ed93b595b9f5604863dd331...
Hey,
i'm working on a project and i have some problems.I have searched but can not find any satisfied answer.
i have a huge file consists of 0 and 1s.
i'm getting 1024 (my chunk) bits into an array chunk and after that i apply SHA1() function which is implemented in openssl/sha.h library.
char chunk[1024];
while((fgets(chunk,1024...
digest = HMAC.digest(Digest.new(SHA1), Base64.decode64(key), HashString) return Base64.encode64(digest.to_s()).chomp()
What would the above be in PHP?
...
Given a set of 100 different strings of equal length, how can you quantify the probability that a SHA1 digest collision for the strings is unlikely... ?
...
I have a small code snippet that I'm trying to get to work in Ruby.
digest = HMAC.digest(Digest.new(SHA1), Base64.decode64(key), HashString) return Base64.encode64(digest.to_s()).chomp()
I tried it as follows:
hashstring = "POST application/octet-stream
Thu, 05 Jun 2008 16:38:19 GMT /rest/objects date:Thu, 05 Jun 2008 16:38:19 GMT g...
I don't want to calculate a file's checksum, just to know if a given string is a valid checksum
...
I have an app that is storing file-based data under a NTFS directory path which keys off the SHA-1 hash of the data. It has several really nice attributes (de-duplication, impervious to other metadata changes, etc.) but I'm curious about the best practices people have experienced for creating hash-based directory storage structures. My p...
Is there any input that SHA-1 will compute to a hex value of fourty-zeros, i.e. "0000000000000000000000000000000000000000"?
...
My iPhone app uses SHA1 for password security over an instant messaging protocol.
Will I be required to declare my app as "containing encryption" when I submit it to Apple's review process?
...
A lot of people have recently started using SHA1 over MD5. I know that MD5 has it's security flaws but what other reasons is making SHA1 becoming more popular lately?
...
I thought they were there for security; to check that the file hasn't been tampered with. But surely if someone is capable of modifying the file then they are also capable of modifying the page with the hash!
What security does this actually offer?
...
Hi all! There's a website that generates a password by joining a master password with the website's name (e.g. master password=abc and site=google) then hashing that with SHA1 and then coding the resulting hash with Base64. I've been trying to implement that in Bash, but I can't. I mean I can but my results are extremely different from t...
If I have a file that I want to monitor for any changes (other than looking at the file date stamps etc).
How could I perform a SHA1 hash on its contents?
I think this is what GIT does, so I just want to learn how to do it
...
How do I use the SHA1CryptoServiceProvider() on a file to create a SHA1 Checksum of the file?
...
I need a SHA1 source code implementation in Java that performs all the steps in the SHA1 algorithm.
Please help.
...
Using Microsoft FCIV which computes SHA-1 file checksums, I created a text file with file names and checksums:
"8697c58c606122c30e2a20f1eabd6919" "g:\00258\99481\99481.eps"
"b77a6b392c002bb9cc51f48170487dea" "g:\00258\99481\99481.eps"
My intent is to create a Jpeg thumbnail for any images that change. However, this utility takes hour...
Hi, i have been trying to find some examples on how to generate DigestValue and SignatureValue for XML signature (WSDL).
Below is a sample SOAP for the application:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:SOAP-SEC="http://schemas.xmlsoap.org/soap/security/2000-12" xmlns:soapenv="http://schemas.xmlsoap.org/soap/en...
Are there algorithms for putting a digest into the file being digested?
In otherwords, are there algorithms or libraries, or is it even possible to have a hash/digest of a file contained in the file being hashed/digested. This would be handy for obvious reasons, such as built in digests of ISOs. I've tried googling things like "MD5 inje...