OSDN Git Service

2009-11-30 Thomas Quinot <quinot@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 30 Nov 2009 15:51:15 +0000 (15:51 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 30 Nov 2009 15:51:15 +0000 (15:51 +0000)
* s-sechas.adb, s-sechas.ads, s-shshco.adb, s-shshco.ads, s-shsh64.adb,
s-shsh64.ads, s-sehamd.adb, s-sehamd.ads, s-shsh32.adb, s-shsh32.ads,
s-sehash.adb, s-sehash.ads, g-sechas.adb, g-sechas.ads, g-shshco.adb,
g-shshco.ads, g-md5.ads, g-sha256.ads, g-shsh64.adb, g-shsh64.ads,
g-sehamd.adb, g-sehamd.ads, g-sha512.ads, g-sha1.ads, Makefile.rtl,
g-sha224.ads, g-shsh32.adb, g-shsh32.ads, g-sha384.ads, g-sehash.adb,
g-sehash.ads: Rename System.Secure_Hashes to GNAT.Secure_Hashes.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154822 138bc75d-0d04-0410-961f-82ee72b054a4

20 files changed:
gcc/ada/ChangeLog
gcc/ada/Makefile.rtl
gcc/ada/g-md5.ads
gcc/ada/g-sechas.adb [moved from gcc/ada/s-sechas.adb with 98% similarity]
gcc/ada/g-sechas.ads [moved from gcc/ada/s-sechas.ads with 94% similarity]
gcc/ada/g-sehamd.adb [moved from gcc/ada/s-sehamd.adb with 98% similarity]
gcc/ada/g-sehamd.ads [moved from gcc/ada/s-sehamd.ads with 92% similarity]
gcc/ada/g-sehash.adb [moved from gcc/ada/s-sehash.adb with 96% similarity]
gcc/ada/g-sehash.ads [moved from gcc/ada/s-sehash.ads with 93% similarity]
gcc/ada/g-sha1.ads
gcc/ada/g-sha224.ads
gcc/ada/g-sha256.ads
gcc/ada/g-sha384.ads
gcc/ada/g-sha512.ads
gcc/ada/g-shsh32.adb [moved from gcc/ada/s-shsh32.adb with 95% similarity]
gcc/ada/g-shsh32.ads [moved from gcc/ada/s-shsh32.ads with 94% similarity]
gcc/ada/g-shsh64.adb [moved from gcc/ada/s-shsh64.adb with 95% similarity]
gcc/ada/g-shsh64.ads [moved from gcc/ada/s-shsh64.ads with 95% similarity]
gcc/ada/g-shshco.adb [moved from gcc/ada/s-shshco.adb with 95% similarity]
gcc/ada/g-shshco.ads [moved from gcc/ada/s-shshco.ads with 92% similarity]

index 86e754b..4c3e007 100644 (file)
@@ -1,3 +1,13 @@
+2009-11-30  Thomas Quinot  <quinot@adacore.com>
+
+       * s-sechas.adb, s-sechas.ads, s-shshco.adb, s-shshco.ads, s-shsh64.adb,
+       s-shsh64.ads, s-sehamd.adb, s-sehamd.ads, s-shsh32.adb, s-shsh32.ads,
+       s-sehash.adb, s-sehash.ads, g-sechas.adb, g-sechas.ads, g-shshco.adb,
+       g-shshco.ads, g-md5.ads, g-sha256.ads, g-shsh64.adb, g-shsh64.ads,
+       g-sehamd.adb, g-sehamd.ads, g-sha512.ads, g-sha1.ads, Makefile.rtl,
+       g-sha224.ads, g-shsh32.adb, g-shsh32.ads, g-sha384.ads, g-sehash.adb,
+       g-sehash.ads: Rename System.Secure_Hashes to GNAT.Secure_Hashes.
+
 2009-11-30  Robert Dewar  <dewar@adacore.com>
 
        * osint.ads: Minor comment update.
 2009-11-30  Robert Dewar  <dewar@adacore.com>
 
        * osint.ads: Minor comment update.
index 5b09529..f101a52 100644 (file)
@@ -367,6 +367,9 @@ GNATRTL_NONTASKING_OBJS= \
   g-rannum$(objext) \
   g-regexp$(objext) \
   g-regpat$(objext) \
   g-rannum$(objext) \
   g-regexp$(objext) \
   g-regpat$(objext) \
+  g-sechas$(objext) \
+  g-sehamd$(objext) \
+  g-sehash$(objext) \
   g-sercom$(objext) \
   g-sestin$(objext) \
   g-sha1$(objext) \
   g-sercom$(objext) \
   g-sestin$(objext) \
   g-sha1$(objext) \
@@ -374,6 +377,9 @@ GNATRTL_NONTASKING_OBJS= \
   g-sha256$(objext) \
   g-sha384$(objext) \
   g-sha512$(objext) \
   g-sha256$(objext) \
   g-sha384$(objext) \
   g-sha512$(objext) \
+  g-shsh32$(objext) \
+  g-shsh64$(objext) \
+  g-shshco$(objext) \
   g-souinf$(objext) \
   g-spchge$(objext) \
   g-speche$(objext) \
   g-souinf$(objext) \
   g-spchge$(objext) \
   g-speche$(objext) \
@@ -562,15 +568,9 @@ GNATRTL_NONTASKING_OBJS= \
   s-rident$(objext) \
   s-rpc$(objext)    \
   s-scaval$(objext) \
   s-rident$(objext) \
   s-rpc$(objext)    \
   s-scaval$(objext) \
-  s-sechas$(objext) \
   s-secsta$(objext) \
   s-secsta$(objext) \
-  s-sehamd$(objext) \
-  s-sehash$(objext) \
   s-sequio$(objext) \
   s-shasto$(objext) \
   s-sequio$(objext) \
   s-shasto$(objext) \
-  s-shsh32$(objext) \
-  s-shsh64$(objext) \
-  s-shshco$(objext) \
   s-soflin$(objext) \
   s-stache$(objext) \
   s-stalib$(objext) \
   s-soflin$(objext) \
   s-stache$(objext) \
   s-stalib$(objext) \
index 0f2d283..70eb007 100644 (file)
 --  RFC 1321. The complete text of RFC 1321 can be found at:
 --          http://www.ietf.org/rfc/rfc1321.txt
 
 --  RFC 1321. The complete text of RFC 1321 can be found at:
 --          http://www.ietf.org/rfc/rfc1321.txt
 
---  See the declaration of System.Secure_Hashes.H in s-sechas.ads for complete
+--  See the declaration of GNAT.Secure_Hashes.H in g-sechas.ads for complete
 --  documentation.
 
 --  documentation.
 
-with System.Secure_Hashes.MD5;
+with GNAT.Secure_Hashes.MD5;
+with System;
 
 
-package GNAT.MD5 is new System.Secure_Hashes.H
-  (Block_Words    => System.Secure_Hashes.MD5.Block_Words,
+package GNAT.MD5 is new GNAT.Secure_Hashes.H
+  (Block_Words    => GNAT.Secure_Hashes.MD5.Block_Words,
    State_Words    => 4,
    Hash_Words     => 4,
    Hash_Bit_Order => System.Low_Order_First,
    State_Words    => 4,
    Hash_Words     => 4,
    Hash_Bit_Order => System.Low_Order_First,
-   Hash_State     => System.Secure_Hashes.MD5.Hash_State,
-   Initial_State  => System.Secure_Hashes.MD5.Initial_State,
-   Transform      => System.Secure_Hashes.MD5.Transform);
+   Hash_State     => GNAT.Secure_Hashes.MD5.Hash_State,
+   Initial_State  => GNAT.Secure_Hashes.MD5.Initial_State,
+   Transform      => GNAT.Secure_Hashes.MD5.Transform);
similarity index 98%
rename from gcc/ada/s-sechas.adb
rename to gcc/ada/g-sechas.adb
index d34f049..1c57548 100644 (file)
@@ -2,7 +2,7 @@
 --                                                                          --
 --                         GNAT LIBRARY COMPONENTS                          --
 --                                                                          --
 --                                                                          --
 --                         GNAT LIBRARY COMPONENTS                          --
 --                                                                          --
---                 S Y S T E M . S E C U R E _ H A S H E S                  --
+--                   G N A T . S E C U R E _ H A S H E S                    --
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
@@ -32,7 +32,7 @@
 with System;     use System;
 with Interfaces; use Interfaces;
 
 with System;     use System;
 with Interfaces; use Interfaces;
 
-package body System.Secure_Hashes is
+package body GNAT.Secure_Hashes is
 
    use Ada.Streams;
 
 
    use Ada.Streams;
 
@@ -364,4 +364,4 @@ package body System.Secure_Hashes is
 
    end Hash_Function_State;
 
 
    end Hash_Function_State;
 
-end System.Secure_Hashes;
+end GNAT.Secure_Hashes;
similarity index 94%
rename from gcc/ada/s-sechas.ads
rename to gcc/ada/g-sechas.ads
index 3333083..55180ac 100644 (file)
@@ -2,7 +2,7 @@
 --                                                                          --
 --                         GNAT LIBRARY COMPONENTS                          --
 --                                                                          --
 --                                                                          --
 --                         GNAT LIBRARY COMPONENTS                          --
 --                                                                          --
---                 S Y S T E M . S E C U R E _ H A S H E S                  --
+--                   G N A T . S E C U R E _ H A S H E S                    --
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
 --  hash functions (including MD5 and the FIPS PUB 180-3 functions SHA-1,
 --  SHA-224, SHA-256, SHA-384 and SHA-512).
 
 --  hash functions (including MD5 and the FIPS PUB 180-3 functions SHA-1,
 --  SHA-224, SHA-256, SHA-384 and SHA-512).
 
+--  This is an internal unit and should be not used directly in applications.
+--  Use GNAT.MD5 and GNAT.SHA* instead.
+
 with Ada.Streams;
 with Interfaces;
 with Ada.Streams;
 with Interfaces;
+with System;
 
 
-package System.Secure_Hashes is
+package GNAT.Secure_Hashes is
 
    type Buffer_Type is new String;
    for Buffer_Type'Alignment use 8;
 
    type Buffer_Type is new String;
    for Buffer_Type'Alignment use 8;
@@ -120,6 +124,10 @@ package System.Secure_Hashes is
 
    package H is
 
 
    package H is
 
+      --  The visible part of H is the interface to secure hashing functions
+      --  that is exposed to user applications, and is intended to remain
+      --  a stable interface.
+
       pragma Assert (Hash_Words <= State_Words);
 
       type Context is private;
       pragma Assert (Hash_Words <= State_Words);
 
       type Context is private;
@@ -176,4 +184,4 @@ package System.Secure_Hashes is
 
    end H;
 
 
    end H;
 
-end System.Secure_Hashes;
+end GNAT.Secure_Hashes;
similarity index 98%
rename from gcc/ada/s-sehamd.adb
rename to gcc/ada/g-sehamd.adb
index cc04e6a..cd8a1f5 100644 (file)
@@ -2,7 +2,7 @@
 --                                                                          --
 --                         GNAT LIBRARY COMPONENTS                          --
 --                                                                          --
 --                                                                          --
 --                         GNAT LIBRARY COMPONENTS                          --
 --                                                                          --
---             S Y S T E M . S E C U R E _ H A S H E S . M D 5              --
+--               G N A T . S E C U R E _ H A S H E S . M D 5                --
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
@@ -31,7 +31,7 @@
 
 with GNAT.Byte_Swapping; use GNAT.Byte_Swapping;
 
 
 with GNAT.Byte_Swapping; use GNAT.Byte_Swapping;
 
-package body System.Secure_Hashes.MD5 is
+package body GNAT.Secure_Hashes.MD5 is
 
    use Interfaces;
 
 
    use Interfaces;
 
@@ -226,6 +226,8 @@ package body System.Secure_Hashes.MD5 is
      (H : in out Hash_State.State;
       M : in out Message_State)
    is
      (H : in out Hash_State.State;
       M : in out Message_State)
    is
+      use System;
+
       X : array (0 .. 15) of Interfaces.Unsigned_32;
       for X'Address use M.Buffer'Address;
       pragma Import (Ada, X);
       X : array (0 .. 15) of Interfaces.Unsigned_32;
       for X'Address use M.Buffer'Address;
       pragma Import (Ada, X);
@@ -236,7 +238,7 @@ package body System.Secure_Hashes.MD5 is
       DD : Unsigned_32 := H (3);
 
    begin
       DD : Unsigned_32 := H (3);
 
    begin
-      if System.Default_Bit_Order /= Low_Order_First then
+      if Default_Bit_Order /= Low_Order_First then
          for J in X'Range loop
             Swap4 (X (J)'Address);
          end loop;
          for J in X'Range loop
             Swap4 (X (J)'Address);
          end loop;
@@ -337,4 +339,4 @@ package body System.Secure_Hashes.MD5 is
 
    end Transform;
 
 
    end Transform;
 
-end System.Secure_Hashes.MD5;
+end GNAT.Secure_Hashes.MD5;
similarity index 92%
rename from gcc/ada/s-sehamd.ads
rename to gcc/ada/g-sehamd.ads
index 206050f..2340636 100644 (file)
@@ -2,7 +2,7 @@
 --                                                                          --
 --                         GNAT LIBRARY COMPONENTS                          --
 --                                                                          --
 --                                                                          --
 --                         GNAT LIBRARY COMPONENTS                          --
 --                                                                          --
---             S Y S T E M . S E C U R E _ H A S H E S . M D 5              --
+--               G N A T . S E C U R E _ H A S H E S . M D 5                --
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
 --  RFC 1321 can be found at:
 --          http://www.ietf.org/rfc/rfc1321.txt
 
 --  RFC 1321 can be found at:
 --          http://www.ietf.org/rfc/rfc1321.txt
 
+--  This is an internal unit and should not be used directly in applications.
+--  Use GNAT.MD5 instead.
+
 with GNAT.Byte_Swapping;
 with Interfaces;
 
 with GNAT.Byte_Swapping;
 with Interfaces;
 
-package System.Secure_Hashes.MD5 is
+package GNAT.Secure_Hashes.MD5 is
 
    package Hash_State is
 
    package Hash_State is
-     new System.Secure_Hashes.Hash_Function_State
+     new GNAT.Secure_Hashes.Hash_Function_State
            (Word           => Interfaces.Unsigned_32,
             Swap           => GNAT.Byte_Swapping.Swap4,
             Hash_Bit_Order => System.Low_Order_First);
            (Word           => Interfaces.Unsigned_32,
             Swap           => GNAT.Byte_Swapping.Swap4,
             Hash_Bit_Order => System.Low_Order_First);
@@ -68,4 +71,4 @@ private
                      (Initial_A, Initial_B, Initial_C, Initial_D);
    --  Initialization vector from RFC 1321
 
                      (Initial_A, Initial_B, Initial_C, Initial_D);
    --  Initialization vector from RFC 1321
 
-end System.Secure_Hashes.MD5;
+end GNAT.Secure_Hashes.MD5;
similarity index 96%
rename from gcc/ada/s-sehash.adb
rename to gcc/ada/g-sehash.adb
index c9ee113..b5e9689 100644 (file)
@@ -2,7 +2,7 @@
 --                                                                          --
 --                         GNAT LIBRARY COMPONENTS                          --
 --                                                                          --
 --                                                                          --
 --                         GNAT LIBRARY COMPONENTS                          --
 --                                                                          --
---            S Y S T E M . S E C U R E _ H A S H E S . S H A 1             --
+--              G N A T . S E C U R E _ H A S H E S . S H A 1               --
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
@@ -29,7 +29,7 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
 --                                                                          --
 ------------------------------------------------------------------------------
 
-package body System.Secure_Hashes.SHA1 is
+package body GNAT.Secure_Hashes.SHA1 is
 
    use Interfaces;
    use GNAT.Byte_Swapping;
 
    use Interfaces;
    use GNAT.Byte_Swapping;
@@ -99,6 +99,8 @@ package body System.Secure_Hashes.SHA1 is
      (H : in out Hash_State.State;
       M : in out Message_State)
    is
      (H : in out Hash_State.State;
       M : in out Message_State)
    is
+      use System;
+
       type Words is array (Natural range <>) of Interfaces.Unsigned_32;
 
       X : Words (0 .. 15);
       type Words is array (Natural range <>) of Interfaces.Unsigned_32;
 
       X : Words (0 .. 15);
@@ -110,7 +112,7 @@ package body System.Secure_Hashes.SHA1 is
       A, B, C, D, E, Temp : Interfaces.Unsigned_32;
 
    begin
       A, B, C, D, E, Temp : Interfaces.Unsigned_32;
 
    begin
-      if System.Default_Bit_Order /= High_Order_First then
+      if Default_Bit_Order /= High_Order_First then
          for J in X'Range loop
             Swap4 (X (J)'Address);
          end loop;
          for J in X'Range loop
             Swap4 (X (J)'Address);
          end loop;
@@ -174,4 +176,4 @@ package body System.Secure_Hashes.SHA1 is
       H (4) := H (4) + E;
    end Transform;
 
       H (4) := H (4) + E;
    end Transform;
 
-end System.Secure_Hashes.SHA1;
+end GNAT.Secure_Hashes.SHA1;
similarity index 93%
rename from gcc/ada/s-sehash.ads
rename to gcc/ada/g-sehash.ads
index 5a041e0..e03f8a2 100644 (file)
@@ -2,7 +2,7 @@
 --                                                                          --
 --                         GNAT LIBRARY COMPONENTS                          --
 --                                                                          --
 --                                                                          --
 --                         GNAT LIBRARY COMPONENTS                          --
 --                                                                          --
---            S Y S T E M . S E C U R E _ H A S H E S . S H A 1             --
+--              G N A T . S E C U R E _ H A S H E S . S H A 1               --
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
 --  of FIPS PUB 180-3 can be found at:
 --    http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf
 
 --  of FIPS PUB 180-3 can be found at:
 --    http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf
 
+--  This is an internal unit and should not be used directly in applications.
+--  Use GNAT.SHA1 instead.
+
 with GNAT.Byte_Swapping;
 with Interfaces;
 
 with GNAT.Byte_Swapping;
 with Interfaces;
 
-package System.Secure_Hashes.SHA1 is
+package GNAT.Secure_Hashes.SHA1 is
 
    package Hash_State is new Hash_Function_State
      (Word           => Interfaces.Unsigned_32,
 
    package Hash_State is new Hash_Function_State
      (Word           => Interfaces.Unsigned_32,
@@ -66,4 +69,4 @@ private
                       4 => 16#C3D2E1F0#);
    --  Initialization vector from FIPS PUB 180-3
 
                       4 => 16#C3D2E1F0#);
    --  Initialization vector from FIPS PUB 180-3
 
-end System.Secure_Hashes.SHA1;
+end GNAT.Secure_Hashes.SHA1;
index 8570923..3913205 100644 (file)
 --  FIPS PUB 180-3. The complete text of FIPS PUB 180-3 can be found at:
 --    http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf
 
 --  FIPS PUB 180-3. The complete text of FIPS PUB 180-3 can be found at:
 --    http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf
 
---  See the declaration of System.Secure_Hashes.H in s-sechas.ads for complete
+--  See the declaration of GNAT.Secure_Hashes.H in g-sechas.ads for complete
 --  documentation.
 
 --  documentation.
 
-with System.Secure_Hashes.SHA1;
+with GNAT.Secure_Hashes.SHA1;
+with System;
 
 
-package GNAT.SHA1 is new System.Secure_Hashes.H
-  (Block_Words    => System.Secure_Hashes.SHA1.Block_Words,
+package GNAT.SHA1 is new GNAT.Secure_Hashes.H
+  (Block_Words    => GNAT.Secure_Hashes.SHA1.Block_Words,
    State_Words    => 5,
    Hash_Words     => 5,
    Hash_Bit_Order => System.High_Order_First,
    State_Words    => 5,
    Hash_Words     => 5,
    Hash_Bit_Order => System.High_Order_First,
-   Hash_State     => System.Secure_Hashes.SHA1.Hash_State,
-   Initial_State  => System.Secure_Hashes.SHA1.Initial_State,
-   Transform      => System.Secure_Hashes.SHA1.Transform);
+   Hash_State     => GNAT.Secure_Hashes.SHA1.Hash_State,
+   Initial_State  => GNAT.Secure_Hashes.SHA1.Initial_State,
+   Transform      => GNAT.Secure_Hashes.SHA1.Transform);
index c79f87f..c7084e8 100644 (file)
 --  FIPS PUB 180-3. The complete text of FIPS PUB 180-3 can be found at:
 --    http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf
 
 --  FIPS PUB 180-3. The complete text of FIPS PUB 180-3 can be found at:
 --    http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf
 
---  See the declaration of System.Secure_Hashes.H in s-sechas.ads for complete
+--  See the declaration of GNAT.Secure_Hashes.H in g-sechas.ads for complete
 --  documentation.
 
 --  documentation.
 
-with System.Secure_Hashes.SHA2_Common;
-with System.Secure_Hashes.SHA2_32;
+with GNAT.Secure_Hashes.SHA2_Common;
+with GNAT.Secure_Hashes.SHA2_32;
+with System;
 
 
-package GNAT.SHA224 is new System.Secure_Hashes.H
-  (Block_Words    => System.Secure_Hashes.SHA2_Common.Block_Words,
+package GNAT.SHA224 is new GNAT.Secure_Hashes.H
+  (Block_Words    => GNAT.Secure_Hashes.SHA2_Common.Block_Words,
    State_Words    => 8,
    Hash_Words     => 7,
    Hash_Bit_Order => System.High_Order_First,
    State_Words    => 8,
    Hash_Words     => 7,
    Hash_Bit_Order => System.High_Order_First,
-   Hash_State     => System.Secure_Hashes.SHA2_32.Hash_State,
-   Initial_State  => System.Secure_Hashes.SHA2_32.SHA224_Init_State,
-   Transform      => System.Secure_Hashes.SHA2_32.Transform);
+   Hash_State     => GNAT.Secure_Hashes.SHA2_32.Hash_State,
+   Initial_State  => GNAT.Secure_Hashes.SHA2_32.SHA224_Init_State,
+   Transform      => GNAT.Secure_Hashes.SHA2_32.Transform);
index a45e057..164f662 100644 (file)
 --  FIPS PUB 180-3. The complete text of FIPS PUB 180-3 can be found at:
 --    http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf
 
 --  FIPS PUB 180-3. The complete text of FIPS PUB 180-3 can be found at:
 --    http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf
 
---  See the declaration of System.Secure_Hashes.H in s-sechas.ads for complete
+--  See the declaration of GNAT.Secure_Hashes.H in g-sechas.ads for complete
 --  documentation.
 
 --  documentation.
 
-with System.Secure_Hashes.SHA2_Common;
-with System.Secure_Hashes.SHA2_32;
+with GNAT.Secure_Hashes.SHA2_Common;
+with GNAT.Secure_Hashes.SHA2_32;
+with System;
 
 
-package GNAT.SHA256 is new System.Secure_Hashes.H
-  (Block_Words    => System.Secure_Hashes.SHA2_Common.Block_Words,
+package GNAT.SHA256 is new GNAT.Secure_Hashes.H
+  (Block_Words    => GNAT.Secure_Hashes.SHA2_Common.Block_Words,
    State_Words    => 8,
    Hash_Words     => 8,
    Hash_Bit_Order => System.High_Order_First,
    State_Words    => 8,
    Hash_Words     => 8,
    Hash_Bit_Order => System.High_Order_First,
-   Hash_State     => System.Secure_Hashes.SHA2_32.Hash_State,
-   Initial_State  => System.Secure_Hashes.SHA2_32.SHA256_Init_State,
-   Transform      => System.Secure_Hashes.SHA2_32.Transform);
+   Hash_State     => GNAT.Secure_Hashes.SHA2_32.Hash_State,
+   Initial_State  => GNAT.Secure_Hashes.SHA2_32.SHA256_Init_State,
+   Transform      => GNAT.Secure_Hashes.SHA2_32.Transform);
index 262fb92..9b02d9b 100644 (file)
 --  FIPS PUB 180-3. The complete text of FIPS PUB 180-3 can be found at:
 --    http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf
 
 --  FIPS PUB 180-3. The complete text of FIPS PUB 180-3 can be found at:
 --    http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf
 
---  See the declaration of System.Secure_Hashes.H in s-sechas.ads for complete
+--  See the declaration of GNAT.Secure_Hashes.H in g-sechas.ads for complete
 --  documentation.
 
 --  documentation.
 
-with System.Secure_Hashes.SHA2_Common;
-with System.Secure_Hashes.SHA2_64;
+with GNAT.Secure_Hashes.SHA2_Common;
+with GNAT.Secure_Hashes.SHA2_64;
+with System;
 
 
-package GNAT.SHA384 is new System.Secure_Hashes.H
-  (Block_Words    => System.Secure_Hashes.SHA2_Common.Block_Words,
+package GNAT.SHA384 is new GNAT.Secure_Hashes.H
+  (Block_Words    => GNAT.Secure_Hashes.SHA2_Common.Block_Words,
    State_Words    => 8,
    Hash_Words     => 6,
    Hash_Bit_Order => System.High_Order_First,
    State_Words    => 8,
    Hash_Words     => 6,
    Hash_Bit_Order => System.High_Order_First,
-   Hash_State     => System.Secure_Hashes.SHA2_64.Hash_State,
-   Initial_State  => System.Secure_Hashes.SHA2_64.SHA384_Init_State,
-   Transform      => System.Secure_Hashes.SHA2_64.Transform);
+   Hash_State     => GNAT.Secure_Hashes.SHA2_64.Hash_State,
+   Initial_State  => GNAT.Secure_Hashes.SHA2_64.SHA384_Init_State,
+   Transform      => GNAT.Secure_Hashes.SHA2_64.Transform);
index dad8079..50f4684 100644 (file)
 --  FIPS PUB 180-3. The complete text of FIPS PUB 180-3 can be found at:
 --    http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf
 
 --  FIPS PUB 180-3. The complete text of FIPS PUB 180-3 can be found at:
 --    http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf
 
---  See the declaration of System.Secure_Hashes.H in s-sechas.ads for complete
+--  See the declaration of GNAT.Secure_Hashes.H in g-sechas.ads for complete
 --  documentation.
 
 --  documentation.
 
-with System.Secure_Hashes.SHA2_Common;
-with System.Secure_Hashes.SHA2_64;
+with GNAT.Secure_Hashes.SHA2_Common;
+with GNAT.Secure_Hashes.SHA2_64;
+with System;
 
 
-package GNAT.SHA512 is new System.Secure_Hashes.H
-  (Block_Words    => System.Secure_Hashes.SHA2_Common.Block_Words,
+package GNAT.SHA512 is new GNAT.Secure_Hashes.H
+  (Block_Words    => GNAT.Secure_Hashes.SHA2_Common.Block_Words,
    State_Words    => 8,
    Hash_Words     => 8,
    Hash_Bit_Order => System.High_Order_First,
    State_Words    => 8,
    Hash_Words     => 8,
    Hash_Bit_Order => System.High_Order_First,
-   Hash_State     => System.Secure_Hashes.SHA2_64.Hash_State,
-   Initial_State  => System.Secure_Hashes.SHA2_64.SHA512_Init_State,
-   Transform      => System.Secure_Hashes.SHA2_64.Transform);
+   Hash_State     => GNAT.Secure_Hashes.SHA2_64.Hash_State,
+   Initial_State  => GNAT.Secure_Hashes.SHA2_64.SHA512_Init_State,
+   Transform      => GNAT.Secure_Hashes.SHA2_64.Transform);
similarity index 95%
rename from gcc/ada/s-shsh32.adb
rename to gcc/ada/g-shsh32.adb
index bb9472a..c9845f1 100644 (file)
@@ -2,7 +2,7 @@
 --                                                                          --
 --                         GNAT LIBRARY COMPONENTS                          --
 --                                                                          --
 --                                                                          --
 --                         GNAT LIBRARY COMPONENTS                          --
 --                                                                          --
---         S Y S T E M . S E C U R E _ H A S H E S . S H A 2 _ 3 2          --
+--           G N A T . S E C U R E _ H A S H E S . S H A 2 _ 3 2            --
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
@@ -29,7 +29,7 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
 --                                                                          --
 ------------------------------------------------------------------------------
 
-package body System.Secure_Hashes.SHA2_32 is
+package body GNAT.Secure_Hashes.SHA2_32 is
 
    use Interfaces;
 
 
    use Interfaces;
 
@@ -77,4 +77,4 @@ package body System.Secure_Hashes.SHA2_32 is
          xor Shift_Right  (X, 10);
    end S1;
 
          xor Shift_Right  (X, 10);
    end S1;
 
-end System.Secure_Hashes.SHA2_32;
+end GNAT.Secure_Hashes.SHA2_32;
similarity index 94%
rename from gcc/ada/s-shsh32.ads
rename to gcc/ada/g-shsh32.ads
index ca8d07c..5b6444b 100644 (file)
@@ -2,7 +2,7 @@
 --                                                                          --
 --                         GNAT LIBRARY COMPONENTS                          --
 --                                                                          --
 --                                                                          --
 --                         GNAT LIBRARY COMPONENTS                          --
 --                                                                          --
---         S Y S T E M . S E C U R E _ H A S H E S . S H A 2 _ 3 2          --
+--           G N A T . S E C U R E _ H A S H E S . S H A 2 _ 3 2            --
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
 
 --  This pacakge provides support for the 32-bit FIPS PUB 180-3 functions
 ------------------------------------------------------------------------------
 
 --  This pacakge provides support for the 32-bit FIPS PUB 180-3 functions
---  SHA-256 and SHA-224.
+--  SHA-224 and SHA-256.
+
+--  This is an internal unit and should not be used directly in applications.
+--  Use GNAT.SHA224 and GNAT.SHA256 instead.
 
 with Interfaces;
 with GNAT.Byte_Swapping;
 
 with Interfaces;
 with GNAT.Byte_Swapping;
-with System.Secure_Hashes.SHA2_Common;
+with GNAT.Secure_Hashes.SHA2_Common;
 
 
-package System.Secure_Hashes.SHA2_32 is
+package GNAT.Secure_Hashes.SHA2_32 is
 
    subtype Word is Interfaces.Unsigned_32;
 
 
    subtype Word is Interfaces.Unsigned_32;
 
@@ -102,4 +105,4 @@ package System.Secure_Hashes.SHA2_32 is
                           7 => 16#5be0cd19#);
    --  Initialization vectors from FIPS PUB 180-3
 
                           7 => 16#5be0cd19#);
    --  Initialization vectors from FIPS PUB 180-3
 
-end System.Secure_Hashes.SHA2_32;
+end GNAT.Secure_Hashes.SHA2_32;
similarity index 95%
rename from gcc/ada/s-shsh64.adb
rename to gcc/ada/g-shsh64.adb
index bdc6227..330337c 100644 (file)
@@ -2,7 +2,7 @@
 --                                                                          --
 --                         GNAT LIBRARY COMPONENTS                          --
 --                                                                          --
 --                                                                          --
 --                         GNAT LIBRARY COMPONENTS                          --
 --                                                                          --
---         S Y S T E M . S E C U R E _ H A S H E S . S H A 2 _ 6 4          --
+--           G N A T . S E C U R E _ H A S H E S . S H A 2 _ 6 4            --
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
@@ -29,7 +29,7 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
 --                                                                          --
 ------------------------------------------------------------------------------
 
-package body System.Secure_Hashes.SHA2_64 is
+package body GNAT.Secure_Hashes.SHA2_64 is
 
    use Interfaces;
 
 
    use Interfaces;
 
@@ -77,4 +77,4 @@ package body System.Secure_Hashes.SHA2_64 is
          xor Shift_Right  (X, 6);
    end S1;
 
          xor Shift_Right  (X, 6);
    end S1;
 
-end System.Secure_Hashes.SHA2_64;
+end GNAT.Secure_Hashes.SHA2_64;
similarity index 95%
rename from gcc/ada/s-shsh64.ads
rename to gcc/ada/g-shsh64.ads
index b24cb46..9518eda 100644 (file)
@@ -2,7 +2,7 @@
 --                                                                          --
 --                         GNAT LIBRARY COMPONENTS                          --
 --                                                                          --
 --                                                                          --
 --                         GNAT LIBRARY COMPONENTS                          --
 --                                                                          --
---         S Y S T E M . S E C U R E _ H A S H E S . S H A 2 _ 6 4          --
+--           G N A T . S E C U R E _ H A S H E S . S H A 2 _ 6 4            --
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
 
 --  This pacakge provides support for the 64-bit FIPS PUB 180-3 functions
 ------------------------------------------------------------------------------
 
 --  This pacakge provides support for the 64-bit FIPS PUB 180-3 functions
---  (SHA-384 and SHA-512).
+--  SHA-384 and SHA-512.
+
+--  This is an internal unit and should not be used directly in applications.
+--  Use GNAT.SHA384 and GNAT.SHA512 instead.
 
 with Interfaces;
 with GNAT.Byte_Swapping;
 
 
 with Interfaces;
 with GNAT.Byte_Swapping;
 
-with System.Secure_Hashes.SHA2_Common;
+with GNAT.Secure_Hashes.SHA2_Common;
 
 
-package System.Secure_Hashes.SHA2_64 is
+package GNAT.Secure_Hashes.SHA2_64 is
    subtype Word is Interfaces.Unsigned_64;
 
    package Hash_State is new Hash_Function_State
    subtype Word is Interfaces.Unsigned_64;
 
    package Hash_State is new Hash_Function_State
@@ -126,4 +129,4 @@ package System.Secure_Hashes.SHA2_64 is
                           7 => 16#5be0cd19137e2179#);
    --  Initialization vectors from FIPS PUB 180-3
 
                           7 => 16#5be0cd19137e2179#);
    --  Initialization vectors from FIPS PUB 180-3
 
-end System.Secure_Hashes.SHA2_64;
+end GNAT.Secure_Hashes.SHA2_64;
similarity index 95%
rename from gcc/ada/s-shshco.adb
rename to gcc/ada/g-shshco.adb
index bf62bae..dcdb236 100644 (file)
@@ -2,7 +2,7 @@
 --                                                                          --
 --                         GNAT LIBRARY COMPONENTS                          --
 --                                                                          --
 --                                                                          --
 --                         GNAT LIBRARY COMPONENTS                          --
 --                                                                          --
---     S Y S T E M . S E C U R E _ H A S H E S . S H A 2 _ C O M M O N      --
+--       G N A T . S E C U R E _ H A S H E S . S H A 2 _ C O M M O N        --
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
@@ -29,7 +29,7 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
 --                                                                          --
 ------------------------------------------------------------------------------
 
-package body System.Secure_Hashes.SHA2_Common is
+package body GNAT.Secure_Hashes.SHA2_Common is
 
    ---------------
    -- Transform --
 
    ---------------
    -- Transform --
@@ -39,6 +39,8 @@ package body System.Secure_Hashes.SHA2_Common is
      (H_St : in out Hash_State.State;
       M_St : in out Message_State)
    is
      (H_St : in out Hash_State.State;
       M_St : in out Message_State)
    is
+      use System;
+
       subtype Word is Hash_State.Word;
       use type Hash_State.Word;
 
       subtype Word is Hash_State.Word;
       use type Hash_State.Word;
 
@@ -78,7 +80,7 @@ package body System.Secure_Hashes.SHA2_Common is
    --  Start of processing for Transform
 
    begin
    --  Start of processing for Transform
 
    begin
-      if System.Default_Bit_Order /= High_Order_First then
+      if Default_Bit_Order /= High_Order_First then
          for J in X'Range loop
             Hash_State.Swap (X (J)'Address);
          end loop;
          for J in X'Range loop
             Hash_State.Swap (X (J)'Address);
          end loop;
@@ -130,4 +132,4 @@ package body System.Secure_Hashes.SHA2_Common is
       H_St (7) := H + H_St (7);
    end Transform;
 
       H_St (7) := H + H_St (7);
    end Transform;
 
-end System.Secure_Hashes.SHA2_Common;
+end GNAT.Secure_Hashes.SHA2_Common;
similarity index 92%
rename from gcc/ada/s-shshco.ads
rename to gcc/ada/g-shshco.ads
index 68df296..e2f9f91 100644 (file)
@@ -2,7 +2,7 @@
 --                                                                          --
 --                         GNAT LIBRARY COMPONENTS                          --
 --                                                                          --
 --                                                                          --
 --                         GNAT LIBRARY COMPONENTS                          --
 --                                                                          --
---     S Y S T E M . S E C U R E _ H A S H E S . S H A 2 _ C O M M O N      --
+--       G N A T . S E C U R E _ H A S H E S . S H A 2 _ C O M M O N        --
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
 --  can be found at:
 --    http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf
 
 --  can be found at:
 --    http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf
 
-package System.Secure_Hashes.SHA2_Common is
+--  This is an internal unit and should not be used directly in applications.
+--  Use GNAT.SHA* instead.
+
+package GNAT.Secure_Hashes.SHA2_Common is
 
    Block_Words : constant := 16;
    --  All functions operate on blocks of 16 words
 
    Block_Words : constant := 16;
    --  All functions operate on blocks of 16 words
@@ -60,4 +63,4 @@ package System.Secure_Hashes.SHA2_Common is
      (H_St : in out Hash_State.State;
       M_St : in out Message_State);
 
      (H_St : in out Hash_State.State;
       M_St : in out Message_State);
 
-end System.Secure_Hashes.SHA2_Common;
+end GNAT.Secure_Hashes.SHA2_Common;