Zen API
 All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kHash.h
Go to the documentation of this file.
1 
8 #ifndef K_API_HASH_H
9 #define K_API_HASH_H
10 
11 #include <kApi/kApiDef.h>
12 #include <kApi/Crypto/kHash.x.h>
13 
20 //typedef kObject kHash; --forward-declared in kApiDef.x.h
21 
34 kInlineFx(kStatus) kHash_Update(kHash hash, const void* buffer, kSize size)
35 {
36  return xkHash_VTable(hash)->VUpdate(hash, buffer, size);
37 }
38 
51 kInlineFx(kStatus) kHash_Digest(kHash hash, void* buffer, kSize size)
52 {
53  return xkHash_VTable(hash)->VDigest(hash, buffer, size);
54 }
55 
64 {
65  return xkHash_VTable(hash)->VClear(hash);
66 }
67 
76 {
77  return xkHash_VTable(hash)->VDigestSize(hash);
78 }
79 
80 #endif
Abstract base class providing hash functionality.
Represents an unsigned integer that can store a pointer address.
kStatus kHash_Digest(kHash hash, void *buffer, kSize size)
Returns the digest.
Definition: kHash.h:51
#define kInlineFx(TYPE)
Inline method declaration helper.
Definition: kApiDef.h:26
Core Zen type declarations.
kStatus kHash_Clear(kHash hash)
Clears the internal buffer so instance can be updated with new data.
Definition: kHash.h:63
kStatus kHash_Update(kHash hash, const void *buffer, kSize size)
Updates the hash with the data.
Definition: kHash.h:34
Represents an error code.
kSize kHash_DigestSize(kHash hash)
Returns the message digest length in bytes.
Definition: kHash.h:75