reverting some less wise changes and adding license text to main.
This commit is contained in:
parent
fb4f86d816
commit
72e67ab052
15
src/main.adb
15
src/main.adb
|
@ -1,3 +1,18 @@
|
||||||
|
-- Copyright (C) 2015 Daniel Otte <bg@nerilex.org>
|
||||||
|
--
|
||||||
|
-- This program is free software: you can redistribute it and/or modify
|
||||||
|
-- it under the terms of the GNU General Public License as published by
|
||||||
|
-- the Free Software Foundation, either version 3 of the License, or
|
||||||
|
-- (at your option) any later version.
|
||||||
|
--
|
||||||
|
-- This program is distributed in the hope that it will be useful,
|
||||||
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
-- MERCHANTABILITY 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
|
||||||
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
with Ada.Text_IO; use Ada.Text_IO;
|
with Ada.Text_IO; use Ada.Text_IO;
|
||||||
with Crypto_Core_Types; use Crypto_Core_Types;
|
with Crypto_Core_Types; use Crypto_Core_Types;
|
||||||
with Crypto_Types; use Crypto_Types;
|
with Crypto_Types; use Crypto_Types;
|
||||||
|
|
|
@ -110,14 +110,14 @@ package body Spritz is
|
||||||
AbsorbNibble(ctx, Shift_Right(x, 4));
|
AbsorbNibble(ctx, Shift_Right(x, 4));
|
||||||
end Absorb;
|
end Absorb;
|
||||||
|
|
||||||
procedure Absorb (ctx : in out Context; x : access constant u8_Array) is
|
procedure Absorb (ctx : in out Context; x : in u8_Array) is
|
||||||
begin
|
begin
|
||||||
for i in x'Range loop
|
for i in x'Range loop
|
||||||
Absorb(ctx, x(i));
|
Absorb(ctx, x(i));
|
||||||
end loop;
|
end loop;
|
||||||
end Absorb;
|
end Absorb;
|
||||||
|
|
||||||
procedure Absorb (ctx : in out Context; x : access constant String) is
|
procedure Absorb (ctx : in out Context; x : in String) is
|
||||||
begin
|
begin
|
||||||
for i in x'Range loop
|
for i in x'Range loop
|
||||||
Absorb(ctx, u8(Character'Pos(x(i))));
|
Absorb(ctx, u8(Character'Pos(x(i))));
|
||||||
|
|
|
@ -25,8 +25,8 @@ package Spritz is
|
||||||
procedure InitializeContext (ctx : out Context);
|
procedure InitializeContext (ctx : out Context);
|
||||||
procedure AbsorbStop (ctx : in out Context);
|
procedure AbsorbStop (ctx : in out Context);
|
||||||
procedure Absorb (ctx : in out Context; x : in u8);
|
procedure Absorb (ctx : in out Context; x : in u8);
|
||||||
procedure Absorb (ctx : in out Context; x : access constant u8_Array);
|
procedure Absorb (ctx : in out Context; x : in u8_Array);
|
||||||
procedure Absorb (ctx : in out Context; x : access constant String);
|
procedure Absorb (ctx : in out Context; x : in String);
|
||||||
procedure Drip (ctx : in out Context; z : out u8);
|
procedure Drip (ctx : in out Context; z : out u8);
|
||||||
procedure Squeeze (ctx : in out Context; P : out u8_Array);
|
procedure Squeeze (ctx : in out Context; P : out u8_Array);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue