vdiff_keccak 1 with Interfaces; use Interfaces;
vdiff_keccak 2 with Interfaces.C; use Interfaces.C;
vdiff_keccak 3 with Ada.Unchecked_Deallocation;
vdiff_keccak 4 with SMG_Keccak; use SMG_Keccak;
vdiff_keccak 5 package Keccak_C is
vdiff_keccak 6 subtype C_Context is Keccak_Context(Block_Len=>Default_Bitrate);
vdiff_keccak 7 type C_Context_Access is access C_Context;
vdiff_keccak 8 procedure C_Get_Size(Size: out Interfaces.C.size_t);
vdiff_keccak 9 pragma Export (C, C_Get_Size, "keccak_get_ctx_byte_size");
vdiff_keccak 10 function C_Begin return C_Context_Access;
vdiff_keccak 11 pragma Export (C, C_Begin, "keccak_begin");
vdiff_keccak 12 procedure C_Hash(Ctx: C_Context_Access;
vdiff_keccak 13 Input: Interfaces.C.Char_Array;
vdiff_keccak 14 Len: Interfaces.C.Size_T);
vdiff_keccak 15 pragma Export (C, C_Hash, "keccak_hash");
vdiff_keccak 16 procedure C_End(Ctx: C_Context_Access;
vdiff_keccak 17 Output: out Interfaces.C.Char_Array;
vdiff_keccak 18 Len: Interfaces.C.Size_T);
vdiff_keccak 19 pragma Export (C, C_End, "keccak_end");
vdiff_keccak 20 procedure C_Deallocate(Ctx: in out C_Context_Access);
vdiff_keccak 21 pragma Export (C, C_Deallocate, "keccak_free");
vdiff_keccak 22 end Keccak_C;