Package: LSC.HMAC_RIPEMD160

Dependencies

with LSC.RIPEMD160, LSC.Types;

use type LSC.Types.Word32;
use type LSC.Types.Word64;

Description

The HMAC-RIPEMD-160 message authentication

Header

package LSC.HMAC_RIPEMD160 is
 

Type Summary

Context_Type
Primitive Operations:  Context_Finalize, Context_Init, Context_Update, Get_Auth

Other Items:

type Context_Type is private;
HMAC-RIPEMD-160 context

function Context_Init (Key : RIPEMD160.Block_Type) return Context_Type;
Initialize HMAC-RIPEMD-160 context using Key.

procedure Context_Update
  (Context : in out Context_Type;
   Block   : in     RIPEMD160.Block_Type);
pragma Inline (Context_Update);
Update HMAC-RIPEMD-160 Context with message block Block.
 derives Context from *,
                      Block;

procedure Context_Finalize
  (Context : in out Context_Type;
   Block   : in     RIPEMD160.Block_Type;
   Length  : in     RIPEMD160.Block_Length_Type);
pragma Inline (Context_Finalize);
Finalize HMAC-RIPEMD-160 Context using Length bits of final message block Block.
 derives Context from *,
                      Block,
                      Length;

function Get_Auth (Context : in Context_Type) return RIPEMD160.Hash_Type;
Get authentication value from Context

function Authenticate
   (Key     : RIPEMD160.Block_Type;
    Message : RIPEMD160.Message_Type;
    Length  : Types.Word64) return RIPEMD160.Hash_Type;
Perform authentication of Length bits of Message using Key and return the authentication value.
 pre
    Message'First + (Length / RIPEMD160.Block_Size) in Message'Range;

private

   --  Implementation-defined ...
end LSC.HMAC_RIPEMD160;