SHA snippet script download - SHA snippet SHA snippet - Based on the SHA algorithm as given in

SHA snippet script 1.0 Publisher Review:


SHA snippet SHA snippet - Based on the SHA algorithm as given in
SHA snippet - Based on the SHA algorithm as given in "Applied Cryptography" Based on the SHA algorithm as given in "Applied Cryptography"Simple text hash: sha = new SHA; hasharray = sha.hash_text( 'hash me!' ); This returns an array of 5 32-bit integers. The SHA.hash_bytes function does the same thing, but requires an array of bytes as input. Note that the input values will be truncated if they are larger than 8 bits. There are also some hash to string conversion functions. The naming convention admittedly could be better, but it works. sha.hash_to_string( hasharray ) Converts the hash array to an uppercase hex string.Hashing very large blocks a piece at a time: sha = new SHA; sha.init(); while (blocks_to_process) { sha.update( next_byte_array ) } hasharray = sha.finalize() NOTES: This is basically a rip off of SHAPerl.pm, which I also wrote. I discovered, much to my chagrin, that PHP does not have even the crappy 32-bit int support that Perl has, so I had to employ some funny tricks in the code to get it to use all 32 bits.One of the most obvious of these is using an 'add' method instead of just adding numbers together. Any numbers over 32 bits don't get bit-truncated. They get corralled, which is not what I wanted. Another trick I had to employ was splitting large numeric constants into two pieces. Apparently, you can't specify 0xffffffff. It gets set to 0. Everything up to 0x7fffffff works fine. So, I used some shifting and bitwise operators to get the needed constants. A word on optimization: it isn't optimized. My chief concern was to get it working, and it is fast enough for my needs. If, however, you intend to try to brute force some hash values with this, either it will need some serious optimizations done, or you should be using one of the freely available C implementations.

SHA snippet script 1.0 details and screenshot


Screenshot:

Rating: 6 Votes:
Rating for SHA snippet script: 6 from  votes
Rate this software:


Scan computer and update all your drivers before downloading.

Release date: 2009-07-05
Last update: 2009-07-05
Platform: Windows / Linux / BSD / Solaris
Language: PHP
Price:Freeware $
Company: Chris Monson
Info url: http://www.phpclasses.org/browse/package/65.html




Download SHA snippet script 1.0
RECOMMENDED TOOLS


Related tags:

Related downloads

Java Mixins with code generation script      
Java Mixins with code generation Java Mixins with code generation - Ruby style mixin in Ja
Price: Freeware$, Rating: 6, Downloads: 0
Image info from blogging.rb script      
Image info from blogging.rb Image info from blogging.rb - extract image info from blogging
Price: Freeware$, Rating: 7, Downloads: 0
Content Negotiation script      
Content Negotiation Content Negotiation - Serve XHTML as application/xhtml xml to browsers
Price: Freeware$, Rating: 8, Downloads: 0
active record class script      
active record class active record class - iterate through each child association of a acti
Price: Freeware$, Rating: 7, Downloads: 0
useful pear html template it script      
useful pear html template it script useful pear html template it script allows you to show
Price: Freeware$, Rating: 6, Downloads: 0
MovieClip.RandomMask script      
MovieClip.RandomMask MovieClip.RandomMask - Random Mask & Remove Mask prototypes
Price: Freeware$, Rating: 8, Downloads: 0
all_children! script      
all_children! all_children! gives you all the children of a model that acts_as_tree
Price: Freeware$, Rating: 10, Downloads: 0
get current filename as variable script      
get current filename as variable get current filename as variable script allows you to get
Price: GPL$, Rating: 10, Downloads: 0