Mercurial > hg > toybox
comparison toys/sha1sum.c @ 233:d4176f3f3835
Zap toys/Config.in and instead create generated/Config.in from contents of
toys/*.c. Move relevant info into comment at the top of each toys/*.c. Also
convert more of Makefile into a thin wrapper around shell scripts that actually
do the work. (Makefile is only still there for the user interface.)
author | Rob Landley <rob@landley.net> |
---|---|
date | Sat, 19 Jan 2008 17:08:39 -0600 |
parents | 8c0809cee2b0 |
children | 163498bf547b |
comparison
equal
deleted
inserted
replaced
232:cd4d5630c978 | 233:d4176f3f3835 |
---|---|
1 /* | 1 /* vi: set sw=4 ts=4: |
2 * | |
3 * sha1sum.c - Calculate sha1 cryptographic hash for input. | |
4 * | |
2 * Copyright 2007 Rob Landley <rob@landley.net> | 5 * Copyright 2007 Rob Landley <rob@landley.net> |
3 * | 6 * |
4 * Based on the public domain SHA-1 in C by Steve Reid <steve@edmweb.com> | 7 * Based on the public domain SHA-1 in C by Steve Reid <steve@edmweb.com> |
5 * from http://www.mirrors.wiretapped.net/security/cryptography/hashes/sha1/ | 8 * from http://www.mirrors.wiretapped.net/security/cryptography/hashes/sha1/ |
6 * | 9 * |
7 * Not in SUSv3. | 10 * Not in SUSv3. |
8 */ | 11 |
12 config SHA1SUM | |
13 bool "sha1sum" | |
14 default y | |
15 help | |
16 usage: sha1sum [file...] | |
17 | |
18 Calculate sha1 hash of files (or stdin). | |
19 */ | |
9 | 20 |
10 #include <toys.h> | 21 #include <toys.h> |
11 | 22 |
12 struct sha1 { | 23 struct sha1 { |
13 uint32_t state[5]; | 24 uint32_t state[5]; |