-
+ 33D0A8BFAC503D941796252636419DFBC9917D9D67C2E15E13E85083AFB8ED46CDE57452B61EF275CCFDE07B7891D510467B49868882248A5836BCE52EF7A7D0
vtools/src/keccak_c.ads
(0 . 0)(1 . 22)
285 with Interfaces; use Interfaces;
286 with Interfaces.C; use Interfaces.C;
287 with Ada.Unchecked_Deallocation;
288 with SMG_Keccak; use SMG_Keccak;
289 package Keccak_C is
290 subtype C_Context is Keccak_Context(Block_Len=>Default_Bitrate);
291 type C_Context_Access is access C_Context;
292 procedure C_Get_Size(Size: out Interfaces.C.size_t);
293 pragma Export (C, C_Get_Size, "keccak_get_ctx_byte_size");
294 function C_Begin return C_Context_Access;
295 pragma Export (C, C_Begin, "keccak_begin");
296 procedure C_Hash(Ctx: C_Context_Access;
297 Input: Interfaces.C.Char_Array;
298 Len: Interfaces.C.Size_T);
299 pragma Export (C, C_Hash, "keccak_hash");
300 procedure C_End(Ctx: C_Context_Access;
301 Output: out Interfaces.C.Char_Array;
302 Len: Interfaces.C.Size_T);
303 pragma Export (C, C_End, "keccak_end");
304 procedure C_Deallocate(Ctx: in out C_Context_Access);
305 pragma Export (C, C_Deallocate, "keccak_free");
306 end Keccak_C;