vdiff_keccak 1 with Interfaces.C; use Interfaces.C;
vtools_fixes_bitr... 2 with Interfaces.C.Strings;
vtools_fixes_bitr... 3 with Interfaces.C.Pointers;
vdiff_keccak 4 with Ada.Unchecked_Deallocation;
vdiff_keccak 5 with SMG_Keccak; use SMG_Keccak;
vdiff_keccak 6 package Keccak_C is
vtools_fixes_bitr... 7 package Char_Ptrs is
vtools_fixes_bitr... 8 new Interfaces.C.Pointers (Index => size_t,
vtools_fixes_bitr... 9 Element => char,
vtools_fixes_bitr... 10 Element_Array => char_array,
vtools_fixes_bitr... 11 Default_Terminator => nul);
vtools_fixes_bitr... 12 use type Char_Ptrs.Pointer;
vtools_fixes_bitr... 13 subtype Char_Star is Char_Ptrs.Pointer;
vdiff_keccak 14 subtype C_Context is Keccak_Context(Block_Len=>Default_Bitrate);
vdiff_keccak 15 type C_Context_Access is access C_Context;
vdiff_keccak 16 procedure C_Get_Size(Size: out Interfaces.C.size_t);
vdiff_keccak 17 pragma Export (C, C_Get_Size, "keccak_get_ctx_byte_size");
vdiff_keccak 18 function C_Begin return C_Context_Access;
vdiff_keccak 19 pragma Export (C, C_Begin, "keccak_begin");
vdiff_keccak 20 procedure C_Hash(Ctx: C_Context_Access;
vtools_fixes_bitr... 21 Input: Char_Star;
vdiff_keccak 22 Len: Interfaces.C.Size_T);
vdiff_keccak 23 pragma Export (C, C_Hash, "keccak_hash");
vdiff_keccak 24 procedure C_End(Ctx: C_Context_Access;
vtools_fixes_bitr... 25 Output: Char_Star;
vdiff_keccak 26 Len: Interfaces.C.Size_T);
vdiff_keccak 27 pragma Export (C, C_End, "keccak_end");
vdiff_keccak 28 procedure C_Deallocate(Ctx: in out C_Context_Access);
vdiff_keccak 29 pragma Export (C, C_Deallocate, "keccak_free");
vdiff_keccak 30 end Keccak_C;