- 33D0A8BFAC503D941796252636419DFBC9917D9D67C2E15E13E85083AFB8ED46CDE57452B61EF275CCFDE07B7891D510467B49868882248A5836BCE52EF7A7D0
+ 9E720F186B11BB3E2D398765619E1E4220659E74BDF9AD4D3BE83EEB51C9A45E5F7A4BFCECE333F5E86B50838874DBC31462EFD45F25294C3661EB069C9E4DB2
vtools/src/keccak_c.ads
(1 . 8)(1 . 17)
64 with Interfaces; use Interfaces;
65 with Interfaces.C; use Interfaces.C;
66 with Interfaces.C.Strings;
67 with Interfaces.C.Pointers;
68 with Ada.Unchecked_Deallocation;
69 with SMG_Keccak; use SMG_Keccak;
70 package Keccak_C is
71 package Char_Ptrs is
72 new Interfaces.C.Pointers (Index => size_t,
73 Element => char,
74 Element_Array => char_array,
75 Default_Terminator => nul);
76 use type Char_Ptrs.Pointer;
77 subtype Char_Star is Char_Ptrs.Pointer;
78 subtype C_Context is Keccak_Context(Block_Len=>Default_Bitrate);
79 type C_Context_Access is access C_Context;
80 procedure C_Get_Size(Size: out Interfaces.C.size_t);
(10 . 11)(19 . 11)
82 function C_Begin return C_Context_Access;
83 pragma Export (C, C_Begin, "keccak_begin");
84 procedure C_Hash(Ctx: C_Context_Access;
85 Input: Interfaces.C.Char_Array;
86 Input: Char_Star;
87 Len: Interfaces.C.Size_T);
88 pragma Export (C, C_Hash, "keccak_hash");
89 procedure C_End(Ctx: C_Context_Access;
90 Output: out Interfaces.C.Char_Array;
91 Output: Char_Star;
92 Len: Interfaces.C.Size_T);
93 pragma Export (C, C_End, "keccak_end");
94 procedure C_Deallocate(Ctx: in out C_Context_Access);