Skip to content

gweiermann/sha1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is my own implementation of sha1. It's part of a presentation I did for a class 'cryptography'.

Here's an example for hashing 'hello world'

from sha import sha1_hex
sha1_hex(b'hello world')  # outputs: 2aae6c35c94fcfb415dbe95f408b9ce91ee846ed

Here's an example for hashing a file:

from sha import sha1_of_file
sha1_of_file('shattered/shattered-1.pdf')  # outputs: 38762cf7f55934b34d179ae6a4c80cadccbb7f0a

Note: the documents shattered-1.pdf and shattered-2.pdf do collide in sha-1

About

A python implementation of sha1

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages