summaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog10
-rw-r--r--gcc/ada/Makefile.rtl12
-rw-r--r--gcc/ada/g-md5.ads15
-rw-r--r--gcc/ada/g-sechas.adb (renamed from gcc/ada/s-sechas.adb)6
-rw-r--r--gcc/ada/g-sechas.ads (renamed from gcc/ada/s-sechas.ads)14
-rw-r--r--gcc/ada/g-sehamd.adb (renamed from gcc/ada/s-sehamd.adb)10
-rw-r--r--gcc/ada/g-sehamd.ads (renamed from gcc/ada/s-sehamd.ads)11
-rw-r--r--gcc/ada/g-sehash.adb (renamed from gcc/ada/s-sehash.adb)10
-rw-r--r--gcc/ada/g-sehash.ads (renamed from gcc/ada/s-sehash.ads)9
-rw-r--r--gcc/ada/g-sha1.ads15
-rw-r--r--gcc/ada/g-sha224.ads17
-rw-r--r--gcc/ada/g-sha256.ads17
-rw-r--r--gcc/ada/g-sha384.ads17
-rw-r--r--gcc/ada/g-sha512.ads17
-rw-r--r--gcc/ada/g-shsh32.adb (renamed from gcc/ada/s-shsh32.adb)6
-rw-r--r--gcc/ada/g-shsh32.ads (renamed from gcc/ada/s-shsh32.ads)13
-rw-r--r--gcc/ada/g-shsh64.adb (renamed from gcc/ada/s-shsh64.adb)6
-rw-r--r--gcc/ada/g-shsh64.ads (renamed from gcc/ada/s-shsh64.ads)13
-rw-r--r--gcc/ada/g-shshco.adb (renamed from gcc/ada/s-shshco.adb)10
-rw-r--r--gcc/ada/g-shshco.ads (renamed from gcc/ada/s-shshco.ads)9
20 files changed, 141 insertions, 96 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 86e754b003c..4c3e00770ec 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -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.
diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
index 5b095292d43..f101a52e025 100644
--- a/gcc/ada/Makefile.rtl
+++ b/gcc/ada/Makefile.rtl
@@ -367,6 +367,9 @@ GNATRTL_NONTASKING_OBJS= \
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) \
@@ -374,6 +377,9 @@ GNATRTL_NONTASKING_OBJS= \
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) \
@@ -562,15 +568,9 @@ GNATRTL_NONTASKING_OBJS= \
s-rident$(objext) \
s-rpc$(objext) \
s-scaval$(objext) \
- s-sechas$(objext) \
s-secsta$(objext) \
- s-sehamd$(objext) \
- s-sehash$(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) \
diff --git a/gcc/ada/g-md5.ads b/gcc/ada/g-md5.ads
index 0f2d2834091..70eb007b32c 100644
--- a/gcc/ada/g-md5.ads
+++ b/gcc/ada/g-md5.ads
@@ -35,16 +35,17 @@
-- 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.
-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,
- 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);
diff --git a/gcc/ada/s-sechas.adb b/gcc/ada/g-sechas.adb
index d34f0499ff4..1c57548a18f 100644
--- a/gcc/ada/s-sechas.adb
+++ b/gcc/ada/g-sechas.adb
@@ -2,7 +2,7 @@
-- --
-- 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 --
-- --
@@ -32,7 +32,7 @@
with System; use System;
with Interfaces; use Interfaces;
-package body System.Secure_Hashes is
+package body GNAT.Secure_Hashes is
use Ada.Streams;
@@ -364,4 +364,4 @@ package body System.Secure_Hashes is
end Hash_Function_State;
-end System.Secure_Hashes;
+end GNAT.Secure_Hashes;
diff --git a/gcc/ada/s-sechas.ads b/gcc/ada/g-sechas.ads
index 33330836e12..55180ac4ca4 100644
--- a/gcc/ada/s-sechas.ads
+++ b/gcc/ada/g-sechas.ads
@@ -2,7 +2,7 @@
-- --
-- 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 --
-- --
@@ -33,10 +33,14 @@
-- 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 System;
-package System.Secure_Hashes is
+package GNAT.Secure_Hashes is
type Buffer_Type is new String;
for Buffer_Type'Alignment use 8;
@@ -120,6 +124,10 @@ package System.Secure_Hashes 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;
@@ -176,4 +184,4 @@ package System.Secure_Hashes is
end H;
-end System.Secure_Hashes;
+end GNAT.Secure_Hashes;
diff --git a/gcc/ada/s-sehamd.adb b/gcc/ada/g-sehamd.adb
index cc04e6a7773..cd8a1f51686 100644
--- a/gcc/ada/s-sehamd.adb
+++ b/gcc/ada/g-sehamd.adb
@@ -2,7 +2,7 @@
-- --
-- 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 --
-- --
@@ -31,7 +31,7 @@
with GNAT.Byte_Swapping; use GNAT.Byte_Swapping;
-package body System.Secure_Hashes.MD5 is
+package body GNAT.Secure_Hashes.MD5 is
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
+ use System;
+
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
- 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;
@@ -337,4 +339,4 @@ package body System.Secure_Hashes.MD5 is
end Transform;
-end System.Secure_Hashes.MD5;
+end GNAT.Secure_Hashes.MD5;
diff --git a/gcc/ada/s-sehamd.ads b/gcc/ada/g-sehamd.ads
index 206050fb0ec..23406363275 100644
--- a/gcc/ada/s-sehamd.ads
+++ b/gcc/ada/g-sehamd.ads
@@ -2,7 +2,7 @@
-- --
-- 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 --
-- --
@@ -34,13 +34,16 @@
-- 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;
-package System.Secure_Hashes.MD5 is
+package GNAT.Secure_Hashes.MD5 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);
@@ -68,4 +71,4 @@ private
(Initial_A, Initial_B, Initial_C, Initial_D);
-- Initialization vector from RFC 1321
-end System.Secure_Hashes.MD5;
+end GNAT.Secure_Hashes.MD5;
diff --git a/gcc/ada/s-sehash.adb b/gcc/ada/g-sehash.adb
index c9ee11396b8..b5e96895327 100644
--- a/gcc/ada/s-sehash.adb
+++ b/gcc/ada/g-sehash.adb
@@ -2,7 +2,7 @@
-- --
-- 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 --
-- --
@@ -29,7 +29,7 @@
-- --
------------------------------------------------------------------------------
-package body System.Secure_Hashes.SHA1 is
+package body GNAT.Secure_Hashes.SHA1 is
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
+ use System;
+
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
- 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;
@@ -174,4 +176,4 @@ package body System.Secure_Hashes.SHA1 is
H (4) := H (4) + E;
end Transform;
-end System.Secure_Hashes.SHA1;
+end GNAT.Secure_Hashes.SHA1;
diff --git a/gcc/ada/s-sehash.ads b/gcc/ada/g-sehash.ads
index 5a041e0c6e7..e03f8a28146 100644
--- a/gcc/ada/s-sehash.ads
+++ b/gcc/ada/g-sehash.ads
@@ -2,7 +2,7 @@
-- --
-- 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 --
-- --
@@ -34,10 +34,13 @@
-- 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;
-package System.Secure_Hashes.SHA1 is
+package GNAT.Secure_Hashes.SHA1 is
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
-end System.Secure_Hashes.SHA1;
+end GNAT.Secure_Hashes.SHA1;
diff --git a/gcc/ada/g-sha1.ads b/gcc/ada/g-sha1.ads
index 8570923b109..39132054ddf 100644
--- a/gcc/ada/g-sha1.ads
+++ b/gcc/ada/g-sha1.ads
@@ -35,16 +35,17 @@
-- 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.
-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,
- 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);
diff --git a/gcc/ada/g-sha224.ads b/gcc/ada/g-sha224.ads
index c79f87fb8c5..c7084e82bb2 100644
--- a/gcc/ada/g-sha224.ads
+++ b/gcc/ada/g-sha224.ads
@@ -33,17 +33,18 @@
-- 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.
-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,
- 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);
diff --git a/gcc/ada/g-sha256.ads b/gcc/ada/g-sha256.ads
index a45e057f8c2..164f6628fb1 100644
--- a/gcc/ada/g-sha256.ads
+++ b/gcc/ada/g-sha256.ads
@@ -33,17 +33,18 @@
-- 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.
-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,
- 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);
diff --git a/gcc/ada/g-sha384.ads b/gcc/ada/g-sha384.ads
index 262fb92a75c..9b02d9b6f5a 100644
--- a/gcc/ada/g-sha384.ads
+++ b/gcc/ada/g-sha384.ads
@@ -33,17 +33,18 @@
-- 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.
-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,
- 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);
diff --git a/gcc/ada/g-sha512.ads b/gcc/ada/g-sha512.ads
index dad8079a8f5..50f46844816 100644
--- a/gcc/ada/g-sha512.ads
+++ b/gcc/ada/g-sha512.ads
@@ -33,17 +33,18 @@
-- 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.
-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,
- 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);
diff --git a/gcc/ada/s-shsh32.adb b/gcc/ada/g-shsh32.adb
index bb9472a0fc6..c9845f14d90 100644
--- a/gcc/ada/s-shsh32.adb
+++ b/gcc/ada/g-shsh32.adb
@@ -2,7 +2,7 @@
-- --
-- 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 --
-- --
@@ -29,7 +29,7 @@
-- --
------------------------------------------------------------------------------
-package body System.Secure_Hashes.SHA2_32 is
+package body GNAT.Secure_Hashes.SHA2_32 is
use Interfaces;
@@ -77,4 +77,4 @@ package body System.Secure_Hashes.SHA2_32 is
xor Shift_Right (X, 10);
end S1;
-end System.Secure_Hashes.SHA2_32;
+end GNAT.Secure_Hashes.SHA2_32;
diff --git a/gcc/ada/s-shsh32.ads b/gcc/ada/g-shsh32.ads
index ca8d07c4214..5b6444ba62a 100644
--- a/gcc/ada/s-shsh32.ads
+++ b/gcc/ada/g-shsh32.ads
@@ -2,7 +2,7 @@
-- --
-- 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 --
-- --
@@ -30,13 +30,16 @@
------------------------------------------------------------------------------
-- 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 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;
@@ -102,4 +105,4 @@ package System.Secure_Hashes.SHA2_32 is
7 => 16#5be0cd19#);
-- Initialization vectors from FIPS PUB 180-3
-end System.Secure_Hashes.SHA2_32;
+end GNAT.Secure_Hashes.SHA2_32;
diff --git a/gcc/ada/s-shsh64.adb b/gcc/ada/g-shsh64.adb
index bdc622723c7..330337ceb9f 100644
--- a/gcc/ada/s-shsh64.adb
+++ b/gcc/ada/g-shsh64.adb
@@ -2,7 +2,7 @@
-- --
-- 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 --
-- --
@@ -29,7 +29,7 @@
-- --
------------------------------------------------------------------------------
-package body System.Secure_Hashes.SHA2_64 is
+package body GNAT.Secure_Hashes.SHA2_64 is
use Interfaces;
@@ -77,4 +77,4 @@ package body System.Secure_Hashes.SHA2_64 is
xor Shift_Right (X, 6);
end S1;
-end System.Secure_Hashes.SHA2_64;
+end GNAT.Secure_Hashes.SHA2_64;
diff --git a/gcc/ada/s-shsh64.ads b/gcc/ada/g-shsh64.ads
index b24cb460d66..9518eda87a5 100644
--- a/gcc/ada/s-shsh64.ads
+++ b/gcc/ada/g-shsh64.ads
@@ -2,7 +2,7 @@
-- --
-- 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 --
-- --
@@ -30,14 +30,17 @@
------------------------------------------------------------------------------
-- 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 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
@@ -126,4 +129,4 @@ package System.Secure_Hashes.SHA2_64 is
7 => 16#5be0cd19137e2179#);
-- Initialization vectors from FIPS PUB 180-3
-end System.Secure_Hashes.SHA2_64;
+end GNAT.Secure_Hashes.SHA2_64;
diff --git a/gcc/ada/s-shshco.adb b/gcc/ada/g-shshco.adb
index bf62bae6dc3..dcdb23690eb 100644
--- a/gcc/ada/s-shshco.adb
+++ b/gcc/ada/g-shshco.adb
@@ -2,7 +2,7 @@
-- --
-- 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 --
-- --
@@ -29,7 +29,7 @@
-- --
------------------------------------------------------------------------------
-package body System.Secure_Hashes.SHA2_Common is
+package body GNAT.Secure_Hashes.SHA2_Common is
---------------
-- 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
+ use System;
+
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
- 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;
@@ -130,4 +132,4 @@ package body System.Secure_Hashes.SHA2_Common is
H_St (7) := H + H_St (7);
end Transform;
-end System.Secure_Hashes.SHA2_Common;
+end GNAT.Secure_Hashes.SHA2_Common;
diff --git a/gcc/ada/s-shshco.ads b/gcc/ada/g-shshco.ads
index 68df2968448..e2f9f9137f4 100644
--- a/gcc/ada/s-shshco.ads
+++ b/gcc/ada/g-shshco.ads
@@ -2,7 +2,7 @@
-- --
-- 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 --
-- --
@@ -36,7 +36,10 @@
-- 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
@@ -60,4 +63,4 @@ package System.Secure_Hashes.SHA2_Common is
(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;