Skip to content
This repository has been archived by the owner before Nov 9, 2022. It is now read-only.

ajalt/python-sha1

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

Python SHA-1

An implementation of the SHA-1 hashing algorithm in pure python.

This library was designed to demonstrate a straight-forward implementation of the algortihm, and is not designed for speed. The current implementation matches the hashlib api. If you want to see the entire algorithm run in a single function, see this commit.

Usage

The library may be called from the command line. Message input may be piped in stdin:

$ echo hello | python sha1.py
sha1-digest: f572d396fae9206628714fb2ce00f72e94f2258f

One or more files may also be specified as arguments to the script:

 $ python sha1.py myfile myfile2
 sha1-digest: 3f786850e387550fdab836ed7e6dc881de23001b
 sha1-digest: 57a9901af6fe030198ef1737783e2048ee96da4a

About

An implementation of the SHA-1 hashing algorithm in pure python.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages