4 Commits
Author SHA1 Message Date
Carsten Larsen 19f758cedb Fixed missing includeds 2015-06-13 19:46:03 +02:00
Carsten Larsen 91237e5264 Update README.SHA 2015-06-13 19:44:56 +02:00
Carsten Larsen c5cce42e5a Update README.SHA 2015-06-13 19:42:26 +02:00
Carsten Larsen f2f0db9ed6 Update README.md 2015-06-13 19:38:25 +02:00
3 changed files with 10 additions and 51 deletions
-30
View File
@@ -32,9 +32,6 @@ for SHA-1, SHA-256, SHA-384, and SHA-512 are available. All are
equally portable, assuming your compiler supports 64-bit integers
(which gcc does).
For more information on SHA (the algorithms), visit:
http://csrc.nist.gov/encryption/tkhash.html
The following documentation and examples will refer to the SHA-1
implementation. However, they equally apply to the SHA-256, SHA-384,
and SHA-512 implementations except where noted.
@@ -82,16 +79,6 @@ void SHA1Final (SHA1Context *sc, uint8_t hash[SHA1_HASH_SIZE]);
Compile-Time Options
--------------------
HAVE_CONFIG_H
Define this if you want the code to include <config.h>. This is useful
if you use GNU configure.
HAVE_INTTYPES_H
HAVE_STDINT_H
Define one of these to 1 if you have the respective header file. If you
have neither, be sure to typedef/define uint8_t, uint32_t, and uint64_t
appropriately (perhaps in config.h above).
WORDS_BIGENDIAN
Define this if you're on a big-endian processor.
@@ -204,20 +191,3 @@ Example
...
do something with hash
...
Platforms Tested
----------------
gcc was the compiler used on all tested platforms.
FreeBSD i386
Darwin powerpc
Linux i386
Linux alpha
Linux powerpc
Solaris sparc
Comments? Suggestions? Bugs?
----------------------------
Please let me know!
- Allan Saddi <allan@saddi.com>
+4 -15
View File
@@ -1,18 +1,7 @@
Introduction
------------
# Introduction
sha is a simple program that hashes files. It uses the National
Institute of Standards and Technology's Secure Hash Algorithm.
It can use SHA-1, SHA-256, SHA-384, or SHA-512, which generate
respectively, hashes of 160, 256, 384, or 512 bits. sha can be
used in scripts to do, for example, file integrity checking.
sha is a simple program that hashes files. It uses the National Institute of Standards and Technology's Secure Hash Algorithm. It can use SHA-1, SHA-256, SHA-384, or SHA-512, which generate respectively, hashes of 160, 256, 384, or 512 bits. sha can be used in scripts to do, for example, file integrity checking.
Using sha is simple. Just pass the names of one or more files on
the command line.
Using sha is simple. Just pass the names of one or more files on the command line.
You may want to perform a sanity check on sha before relying on
it. A program called "shatest" is built along with sha. If you
run shatest, it will display the results of running the various
SHA algorithms on a set of known test vectors. If the resultant
hash matches what is expected, "PASS" will be displayed. Otherwise
it will display "FAIL."
You may want to perform a sanity check on sha before relying on it. A program called "shatest" is built along with sha. If you run shatest, it will display the results of running the various SHA algorithms on a set of known test vectors. If the resultant hash matches what is expected, "PASS" will be displayed. Otherwise it will display "FAIL."
+6 -6
View File
@@ -32,13 +32,13 @@
#include <string.h>
#include "compiler.h"
/***************************************************************/
#include <exec/io.h>
#include <exec/types.h>
#include <exec/memory.h>
#include <clib/exec_protos.h>
#include <clib/utility_protos.h>
#include <clib/dos_protos.h>
#if defined(AOS3) || defined(AOS4)
# include <exec/io.h>
# include <exec/types.h>
# include <exec/memory.h>
# include <clib/exec_protos.h>
# include <clib/utility_protos.h>
# include <clib/dos_protos.h>
# define ARGPTR STRPTR
# define ARGS_FORMAT ARGSFORMAT
#endif