-- --
-- S p e c --
-- --
--- Copyright (C) 2002-2004 Ada Core Technologies, Inc. --
+-- Copyright (C) 2002-2008, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
--- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
--- MA 02111-1307, USA. --
+-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
+-- Boston, MA 02110-1301, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
--
-- http://www.ietf.org/rfc/rfc1321.txt
--
--- The implementation is derived from the RSA Data Secutity, Inc. MD5
+-- The implementation is derived from the RSA Data Security, Inc. MD5
-- Message-Digest Algorithm, as described in RFC 1321.
with Ada.Streams;
type Context is private;
-- This type is the four-word (16 byte) MD buffer, as described in
- -- RFC 1321 (3.3). It initial value is Initial_Context below.
+ -- RFC 1321 (3.3). Its initial value is Initial_Context below.
Initial_Context : constant Context;
-- Initial value of a Context object. May be used to reinitialize
-- the same final context as a call with the concatenation of the inputs.
subtype Message_Digest is String (1 .. 32);
- -- The string type returned by function Digest.
+ -- The string type returned by function Digest
function Digest (C : Context) return Message_Digest;
-- Extracts the Message-Digest from a context. This function should be
private
-- Magic numbers
+
Initial_A : constant := 16#67452301#;
Initial_B : constant := 16#EFCDAB89#;
Initial_C : constant := 16#98BADCFE#;