Sha_0 (sha_0.ads):

Children:


--  © Copyright 2000 by John Halleck, All rights reserved.
--  Basic Definitions for NSA's Secure Hash Algorithm.
--  This code does the original version (SHA-0) defined in FIPS PUB 180

with Interfaces; use Interfaces;
   --  The only modular types for which rotation and shift are officially
   --  defined are those in Interfaces.
   --  We use Unsigned_64, Unsigned_32, Unsigned_8.
   --  If your machine can't handle these, you are going to have a hard time
   --  implementing the standard, since it is defined in terms of Unsigned_32
   --  and Unsigned_64;
   --  Since Unsigned_64 is ONLY used as a count, incremented by a number less
   --  than or equal to 64, is can be implemented as two Unsigned_32's, and
   --  some alternate code.  The comments give that code.

package SHA_0 is
   pragma Pure (SHA_0);

   Bits_In_Word     : constant := 32; -- Bits per Digest word.
   Words_In_Digest  : constant :=  5;
   Bits_In_Digest   : constant := Bits_In_Word * Words_In_Digest;

   type Digest is array (0 .. Words_In_Digest - 1) of Unsigned_32;

end SHA_0;

Go to ...


This page is http://www.cc.utah.edu/~nahaj/ada/sha/sha-0/sha_0.ads.html
© Copyright 2000 by John Halleck, All Rights Reserved.
This snapshot was last modified on August 23rd, 2000