File
keccak/KeccakNISTInterface.h
— part of check-in
[cff016a477]
at
2013-01-08 22:39:31
on branch trunk
— Added Keccak reference stuff, to be built as library
(user:
bernd
size: 3491)
File
keccakp/KeccakNISTInterface.h
— part of check-in
[90b0958714]
at
2020-01-12 21:09:56
on branch trunk
— Improve haves
(user:
bernd
size: 3491)
0000: 2f 2a 0a 54 68 65 20 4b 65 63 63 61 6b 20 73 70 /*.The Keccak sp
0010: 6f 6e 67 65 20 66 75 6e 63 74 69 6f 6e 2c 20 64 onge function, d
0020: 65 73 69 67 6e 65 64 20 62 79 20 47 75 69 64 6f esigned by Guido
0030: 20 42 65 72 74 6f 6e 69 2c 20 4a 6f 61 6e 20 44 Bertoni, Joan D
0040: 61 65 6d 65 6e 2c 0a 4d 69 63 68 61 c3 ab 6c 20 aemen,.Michaël
0050: 50 65 65 74 65 72 73 20 61 6e 64 20 47 69 6c 6c Peeters and Gill
0060: 65 73 20 56 61 6e 20 41 73 73 63 68 65 2e 20 46 es Van Assche. F
0070: 6f 72 20 6d 6f 72 65 20 69 6e 66 6f 72 6d 61 74 or more informat
0080: 69 6f 6e 2c 20 66 65 65 64 62 61 63 6b 20 6f 72 ion, feedback or
0090: 0a 71 75 65 73 74 69 6f 6e 73 2c 20 70 6c 65 61 .questions, plea
00a0: 73 65 20 72 65 66 65 72 20 74 6f 20 6f 75 72 20 se refer to our
00b0: 77 65 62 73 69 74 65 3a 20 68 74 74 70 3a 2f 2f website: http://
00c0: 6b 65 63 63 61 6b 2e 6e 6f 65 6b 65 6f 6e 2e 6f keccak.noekeon.o
00d0: 72 67 2f 0a 0a 49 6d 70 6c 65 6d 65 6e 74 61 74 rg/..Implementat
00e0: 69 6f 6e 20 62 79 20 74 68 65 20 64 65 73 69 67 ion by the desig
00f0: 6e 65 72 73 2c 0a 68 65 72 65 62 79 20 64 65 6e ners,.hereby den
0100: 6f 74 65 64 20 61 73 20 22 74 68 65 20 69 6d 70 oted as "the imp
0110: 6c 65 6d 65 6e 74 65 72 22 2e 0a 0a 54 6f 20 74 lementer"...To t
0120: 68 65 20 65 78 74 65 6e 74 20 70 6f 73 73 69 62 he extent possib
0130: 6c 65 20 75 6e 64 65 72 20 6c 61 77 2c 20 74 68 le under law, th
0140: 65 20 69 6d 70 6c 65 6d 65 6e 74 65 72 20 68 61 e implementer ha
0150: 73 20 77 61 69 76 65 64 20 61 6c 6c 20 63 6f 70 s waived all cop
0160: 79 72 69 67 68 74 0a 61 6e 64 20 72 65 6c 61 74 yright.and relat
0170: 65 64 20 6f 72 20 6e 65 69 67 68 62 6f 72 69 6e ed or neighborin
0180: 67 20 72 69 67 68 74 73 20 74 6f 20 74 68 65 20 g rights to the
0190: 73 6f 75 72 63 65 20 63 6f 64 65 20 69 6e 20 74 source code in t
01a0: 68 69 73 20 66 69 6c 65 2e 0a 68 74 74 70 3a 2f his file..http:/
01b0: 2f 63 72 65 61 74 69 76 65 63 6f 6d 6d 6f 6e 73 /creativecommons
01c0: 2e 6f 72 67 2f 70 75 62 6c 69 63 64 6f 6d 61 69 .org/publicdomai
01d0: 6e 2f 7a 65 72 6f 2f 31 2e 30 2f 0a 2a 2f 0a 0a n/zero/1.0/.*/..
01e0: 23 69 66 6e 64 65 66 20 5f 4b 65 63 63 61 6b 4e #ifndef _KeccakN
01f0: 49 53 54 49 6e 74 65 72 66 61 63 65 5f 68 5f 0a ISTInterface_h_.
0200: 23 64 65 66 69 6e 65 20 5f 4b 65 63 63 61 6b 4e #define _KeccakN
0210: 49 53 54 49 6e 74 65 72 66 61 63 65 5f 68 5f 0a ISTInterface_h_.
0220: 0a 23 69 6e 63 6c 75 64 65 20 22 4b 65 63 63 61 .#include "Kecca
0230: 6b 53 70 6f 6e 67 65 2e 68 22 0a 0a 74 79 70 65 kSponge.h"..type
0240: 64 65 66 20 75 6e 73 69 67 6e 65 64 20 63 68 61 def unsigned cha
0250: 72 20 42 69 74 53 65 71 75 65 6e 63 65 3b 0a 74 r BitSequence;.t
0260: 79 70 65 64 65 66 20 75 6e 73 69 67 6e 65 64 20 ypedef unsigned
0270: 6c 6f 6e 67 20 6c 6f 6e 67 20 44 61 74 61 4c 65 long long DataLe
0280: 6e 67 74 68 3b 0a 74 79 70 65 64 65 66 20 65 6e ngth;.typedef en
0290: 75 6d 20 7b 20 53 55 43 43 45 53 53 20 3d 20 30 um { SUCCESS = 0
02a0: 2c 20 46 41 49 4c 20 3d 20 31 2c 20 42 41 44 5f , FAIL = 1, BAD_
02b0: 48 41 53 48 4c 45 4e 20 3d 20 32 20 7d 20 48 61 HASHLEN = 2 } Ha
02c0: 73 68 52 65 74 75 72 6e 3b 0a 0a 74 79 70 65 64 shReturn;..typed
02d0: 65 66 20 73 70 6f 6e 67 65 53 74 61 74 65 20 68 ef spongeState h
02e0: 61 73 68 53 74 61 74 65 3b 0a 0a 2f 2a 2a 0a 20 ashState;../**.
02f0: 20 2a 20 46 75 6e 63 74 69 6f 6e 20 74 6f 20 69 * Function to i
0300: 6e 69 74 69 61 6c 69 7a 65 20 74 68 65 20 73 74 nitialize the st
0310: 61 74 65 20 6f 66 20 74 68 65 20 4b 65 63 63 61 ate of the Kecca
0320: 6b 5b 72 2c 20 63 5d 20 73 70 6f 6e 67 65 20 66 k[r, c] sponge f
0330: 75 6e 63 74 69 6f 6e 2e 0a 20 20 2a 20 54 68 65 unction.. * The
0340: 20 72 61 74 65 20 72 20 61 6e 64 20 63 61 70 61 rate r and capa
0350: 63 69 74 79 20 63 20 76 61 6c 75 65 73 20 61 72 city c values ar
0360: 65 20 64 65 74 65 72 6d 69 6e 65 64 20 66 72 6f e determined fro
0370: 6d 20 40 61 20 68 61 73 68 62 69 74 6c 65 6e 2e m @a hashbitlen.
0380: 0a 20 20 2a 20 40 70 61 72 61 6d 20 20 73 74 61 . * @param sta
0390: 74 65 20 20 20 20 20 20 20 50 6f 69 6e 74 65 72 te Pointer
03a0: 20 74 6f 20 74 68 65 20 73 74 61 74 65 20 6f 66 to the state of
03b0: 20 74 68 65 20 73 70 6f 6e 67 65 20 66 75 6e 63 the sponge func
03c0: 74 69 6f 6e 20 74 6f 20 62 65 20 69 6e 69 74 69 tion to be initi
03d0: 61 6c 69 7a 65 64 2e 0a 20 20 2a 20 40 70 61 72 alized.. * @par
03e0: 61 6d 20 20 68 61 73 68 62 69 74 6c 65 6e 20 20 am hashbitlen
03f0: 54 68 65 20 64 65 73 69 72 65 64 20 6e 75 6d 62 The desired numb
0400: 65 72 20 6f 66 20 6f 75 74 70 75 74 20 62 69 74 er of output bit
0410: 73 2c 20 0a 20 20 2a 20 20 20 20 20 20 20 20 20 s, . *
0420: 20 20 20 20 20 20 20 20 20 20 20 20 6f 72 20 30 or 0
0430: 20 66 6f 72 20 4b 65 63 63 61 6b 5b 5d 20 77 69 for Keccak[] wi
0440: 74 68 20 64 65 66 61 75 6c 74 20 70 61 72 61 6d th default param
0450: 65 74 65 72 73 0a 20 20 2a 20 20 20 20 20 20 20 eters. *
0460: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 6e an
0470: 64 20 61 72 62 69 74 72 61 72 69 6c 79 2d 6c 6f d arbitrarily-lo
0480: 6e 67 20 6f 75 74 70 75 74 2e 0a 20 20 2a 20 40 ng output.. * @
0490: 70 72 65 20 20 20 20 54 68 65 20 76 61 6c 75 65 pre The value
04a0: 20 6f 66 20 68 61 73 68 62 69 74 6c 65 6e 20 6d of hashbitlen m
04b0: 75 73 74 20 62 65 20 6f 6e 65 20 6f 66 20 30 2c ust be one of 0,
04c0: 20 32 32 34 2c 20 32 35 36 2c 20 33 38 34 20 61 224, 256, 384 a
04d0: 6e 64 20 35 31 32 2e 0a 20 20 2a 20 40 72 65 74 nd 512.. * @ret
04e0: 75 72 6e 20 53 55 43 43 45 53 53 20 69 66 20 73 urn SUCCESS if s
04f0: 75 63 63 65 73 73 66 75 6c 2c 20 42 41 44 5f 48 uccessful, BAD_H
0500: 41 53 48 4c 45 4e 20 69 66 20 74 68 65 20 76 61 ASHLEN if the va
0510: 6c 75 65 20 6f 66 20 68 61 73 68 62 69 74 6c 65 lue of hashbitle
0520: 6e 20 69 73 20 69 6e 63 6f 72 72 65 63 74 2e 0a n is incorrect..
0530: 20 20 2a 2f 0a 48 61 73 68 52 65 74 75 72 6e 20 */.HashReturn
0540: 49 6e 69 74 28 68 61 73 68 53 74 61 74 65 20 2a Init(hashState *
0550: 73 74 61 74 65 2c 20 69 6e 74 20 68 61 73 68 62 state, int hashb
0560: 69 74 6c 65 6e 29 3b 0a 2f 2a 2a 0a 20 20 2a 20 itlen);./**. *
0570: 46 75 6e 63 74 69 6f 6e 20 74 6f 20 67 69 76 65 Function to give
0580: 20 69 6e 70 75 74 20 64 61 74 61 20 66 6f 72 20 input data for
0590: 74 68 65 20 73 70 6f 6e 67 65 20 66 75 6e 63 74 the sponge funct
05a0: 69 6f 6e 20 74 6f 20 61 62 73 6f 72 62 2e 0a 20 ion to absorb..
05b0: 20 2a 20 40 70 61 72 61 6d 20 20 73 74 61 74 65 * @param state
05c0: 20 20 20 20 20 20 20 50 6f 69 6e 74 65 72 20 74 Pointer t
05d0: 6f 20 74 68 65 20 73 74 61 74 65 20 6f 66 20 74 o the state of t
05e0: 68 65 20 73 70 6f 6e 67 65 20 66 75 6e 63 74 69 he sponge functi
05f0: 6f 6e 20 69 6e 69 74 69 61 6c 69 7a 65 64 20 62 on initialized b
0600: 79 20 49 6e 69 74 28 29 2e 0a 20 20 2a 20 40 70 y Init().. * @p
0610: 61 72 61 6d 20 20 64 61 74 61 20 20 20 20 20 20 aram data
0620: 20 20 50 6f 69 6e 74 65 72 20 74 6f 20 74 68 65 Pointer to the
0630: 20 69 6e 70 75 74 20 64 61 74 61 2e 20 0a 20 20 input data. .
0640: 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 *
0650: 20 20 20 20 20 20 57 68 65 6e 20 40 61 20 64 61 When @a da
0660: 74 61 62 69 74 4c 65 6e 20 69 73 20 6e 6f 74 20 tabitLen is not
0670: 61 20 6d 75 6c 74 69 70 6c 65 20 6f 66 20 38 2c a multiple of 8,
0680: 20 74 68 65 20 6c 61 73 74 20 62 69 74 73 20 6f the last bits o
0690: 66 20 64 61 74 61 20 6d 75 73 74 20 62 65 0a 20 f data must be.
06a0: 20 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 *
06b0: 20 20 20 20 20 20 20 69 6e 20 74 68 65 20 6d 6f in the mo
06c0: 73 74 20 73 69 67 6e 69 66 69 63 61 6e 74 20 62 st significant b
06d0: 69 74 73 20 6f 66 20 74 68 65 20 6c 61 73 74 20 its of the last
06e0: 62 79 74 65 2e 0a 20 20 2a 20 40 70 61 72 61 6d byte.. * @param
06f0: 20 20 64 61 74 61 62 69 74 4c 65 6e 20 20 54 68 databitLen Th
0700: 65 20 6e 75 6d 62 65 72 20 6f 66 20 69 6e 70 75 e number of inpu
0710: 74 20 62 69 74 73 20 70 72 6f 76 69 64 65 64 20 t bits provided
0720: 69 6e 20 74 68 65 20 69 6e 70 75 74 20 64 61 74 in the input dat
0730: 61 2e 0a 20 20 2a 20 40 70 72 65 20 20 20 20 49 a.. * @pre I
0740: 6e 20 74 68 65 20 70 72 65 76 69 6f 75 73 20 63 n the previous c
0750: 61 6c 6c 20 74 6f 20 41 62 73 6f 72 62 28 29 2c all to Absorb(),
0760: 20 64 61 74 61 62 69 74 4c 65 6e 20 77 61 73 20 databitLen was
0770: 61 20 6d 75 6c 74 69 70 6c 65 20 6f 66 20 38 2e a multiple of 8.
0780: 0a 20 20 2a 20 40 72 65 74 75 72 6e 20 53 55 43 . * @return SUC
0790: 43 45 53 53 20 69 66 20 73 75 63 63 65 73 73 66 CESS if successf
07a0: 75 6c 2c 20 46 41 49 4c 20 6f 74 68 65 72 77 69 ul, FAIL otherwi
07b0: 73 65 2e 0a 20 20 2a 2f 0a 48 61 73 68 52 65 74 se.. */.HashRet
07c0: 75 72 6e 20 55 70 64 61 74 65 28 68 61 73 68 53 urn Update(hashS
07d0: 74 61 74 65 20 2a 73 74 61 74 65 2c 20 63 6f 6e tate *state, con
07e0: 73 74 20 42 69 74 53 65 71 75 65 6e 63 65 20 2a st BitSequence *
07f0: 64 61 74 61 2c 20 44 61 74 61 4c 65 6e 67 74 68 data, DataLength
0800: 20 64 61 74 61 62 69 74 6c 65 6e 29 3b 0a 2f 2a databitlen);./*
0810: 2a 0a 20 20 2a 20 46 75 6e 63 74 69 6f 6e 20 74 *. * Function t
0820: 6f 20 73 71 75 65 65 7a 65 20 6f 75 74 70 75 74 o squeeze output
0830: 20 64 61 74 61 20 66 72 6f 6d 20 74 68 65 20 73 data from the s
0840: 70 6f 6e 67 65 20 66 75 6e 63 74 69 6f 6e 2e 0a ponge function..
0850: 20 20 2a 20 49 66 20 40 61 20 68 61 73 68 62 69 * If @a hashbi
0860: 74 6c 65 6e 20 77 61 73 20 6e 6f 74 20 30 20 69 tlen was not 0 i
0870: 6e 20 74 68 65 20 63 61 6c 6c 20 74 6f 20 49 6e n the call to In
0880: 69 74 28 29 2c 20 74 68 65 20 6e 75 6d 62 65 72 it(), the number
0890: 20 6f 66 20 6f 75 74 70 75 74 20 62 69 74 73 20 of output bits
08a0: 69 73 20 65 71 75 61 6c 20 74 6f 20 40 61 20 68 is equal to @a h
08b0: 61 73 68 62 69 74 6c 65 6e 2e 0a 20 20 2a 20 49 ashbitlen.. * I
08c0: 66 20 40 61 20 68 61 73 68 62 69 74 6c 65 6e 20 f @a hashbitlen
08d0: 77 61 73 20 30 20 69 6e 20 74 68 65 20 63 61 6c was 0 in the cal
08e0: 6c 20 74 6f 20 49 6e 69 74 28 29 2c 20 74 68 65 l to Init(), the
08f0: 20 6f 75 74 70 75 74 20 62 69 74 73 20 6d 75 73 output bits mus
0900: 74 20 62 65 20 65 78 74 72 61 63 74 65 64 20 75 t be extracted u
0910: 73 69 6e 67 20 74 68 65 20 53 71 75 65 65 7a 65 sing the Squeeze
0920: 28 29 20 66 75 6e 63 74 69 6f 6e 2e 0a 20 20 2a () function.. *
0930: 20 40 70 61 72 61 6d 20 20 73 74 61 74 65 20 20 @param state
0940: 20 20 20 20 20 50 6f 69 6e 74 65 72 20 74 6f 20 Pointer to
0950: 74 68 65 20 73 74 61 74 65 20 6f 66 20 74 68 65 the state of the
0960: 20 73 70 6f 6e 67 65 20 66 75 6e 63 74 69 6f 6e sponge function
0970: 20 69 6e 69 74 69 61 6c 69 7a 65 64 20 62 79 20 initialized by
0980: 49 6e 69 74 28 29 2e 0a 20 20 2a 20 40 70 61 72 Init().. * @par
0990: 61 6d 20 20 68 61 73 68 76 61 6c 20 20 20 20 20 am hashval
09a0: 50 6f 69 6e 74 65 72 20 74 6f 20 74 68 65 20 62 Pointer to the b
09b0: 75 66 66 65 72 20 77 68 65 72 65 20 74 6f 20 73 uffer where to s
09c0: 74 6f 72 65 20 74 68 65 20 6f 75 74 70 75 74 20 tore the output
09d0: 64 61 74 61 2e 0a 20 20 2a 20 40 72 65 74 75 72 data.. * @retur
09e0: 6e 20 53 55 43 43 45 53 53 20 69 66 20 73 75 63 n SUCCESS if suc
09f0: 63 65 73 73 66 75 6c 2c 20 46 41 49 4c 20 6f 74 cessful, FAIL ot
0a00: 68 65 72 77 69 73 65 2e 0a 20 20 2a 2f 0a 48 61 herwise.. */.Ha
0a10: 73 68 52 65 74 75 72 6e 20 46 69 6e 61 6c 28 68 shReturn Final(h
0a20: 61 73 68 53 74 61 74 65 20 2a 73 74 61 74 65 2c ashState *state,
0a30: 20 42 69 74 53 65 71 75 65 6e 63 65 20 2a 68 61 BitSequence *ha
0a40: 73 68 76 61 6c 29 3b 0a 2f 2a 2a 0a 20 20 2a 20 shval);./**. *
0a50: 46 75 6e 63 74 69 6f 6e 20 74 6f 20 63 6f 6d 70 Function to comp
0a60: 75 74 65 20 61 20 68 61 73 68 20 75 73 69 6e 67 ute a hash using
0a70: 20 74 68 65 20 4b 65 63 63 61 6b 5b 72 2c 20 63 the Keccak[r, c
0a80: 5d 20 73 70 6f 6e 67 65 20 66 75 6e 63 74 69 6f ] sponge functio
0a90: 6e 2e 0a 20 20 2a 20 54 68 65 20 72 61 74 65 20 n.. * The rate
0aa0: 72 20 61 6e 64 20 63 61 70 61 63 69 74 79 20 63 r and capacity c
0ab0: 20 76 61 6c 75 65 73 20 61 72 65 20 64 65 74 65 values are dete
0ac0: 72 6d 69 6e 65 64 20 66 72 6f 6d 20 40 61 20 68 rmined from @a h
0ad0: 61 73 68 62 69 74 6c 65 6e 2e 0a 20 20 2a 20 40 ashbitlen.. * @
0ae0: 70 61 72 61 6d 20 20 68 61 73 68 62 69 74 6c 65 param hashbitle
0af0: 6e 20 20 54 68 65 20 64 65 73 69 72 65 64 20 6e n The desired n
0b00: 75 6d 62 65 72 20 6f 66 20 6f 75 74 70 75 74 20 umber of output
0b10: 62 69 74 73 2e 0a 20 20 2a 20 40 70 61 72 61 6d bits.. * @param
0b20: 20 20 64 61 74 61 20 20 20 20 20 20 20 20 50 6f data Po
0b30: 69 6e 74 65 72 20 74 6f 20 74 68 65 20 69 6e 70 inter to the inp
0b40: 75 74 20 64 61 74 61 2e 20 0a 20 20 2a 20 20 20 ut data. . *
0b50: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0b60: 20 20 57 68 65 6e 20 40 61 20 64 61 74 61 62 69 When @a databi
0b70: 74 4c 65 6e 20 69 73 20 6e 6f 74 20 61 20 6d 75 tLen is not a mu
0b80: 6c 74 69 70 6c 65 20 6f 66 20 38 2c 20 74 68 65 ltiple of 8, the
0b90: 20 6c 61 73 74 20 62 69 74 73 20 6f 66 20 64 61 last bits of da
0ba0: 74 61 20 6d 75 73 74 20 62 65 0a 20 20 2a 20 20 ta must be. *
0bb0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0bc0: 20 20 20 69 6e 20 74 68 65 20 6d 6f 73 74 20 73 in the most s
0bd0: 69 67 6e 69 66 69 63 61 6e 74 20 62 69 74 73 20 ignificant bits
0be0: 6f 66 20 74 68 65 20 6c 61 73 74 20 62 79 74 65 of the last byte
0bf0: 2e 0a 20 20 2a 20 40 70 61 72 61 6d 20 20 64 61 .. * @param da
0c00: 74 61 62 69 74 4c 65 6e 20 20 54 68 65 20 6e 75 tabitLen The nu
0c10: 6d 62 65 72 20 6f 66 20 69 6e 70 75 74 20 62 69 mber of input bi
0c20: 74 73 20 70 72 6f 76 69 64 65 64 20 69 6e 20 74 ts provided in t
0c30: 68 65 20 69 6e 70 75 74 20 64 61 74 61 2e 0a 20 he input data..
0c40: 20 2a 20 40 70 61 72 61 6d 20 20 68 61 73 68 76 * @param hashv
0c50: 61 6c 20 20 20 20 20 50 6f 69 6e 74 65 72 20 74 al Pointer t
0c60: 6f 20 74 68 65 20 62 75 66 66 65 72 20 77 68 65 o the buffer whe
0c70: 72 65 20 74 6f 20 73 74 6f 72 65 20 74 68 65 20 re to store the
0c80: 6f 75 74 70 75 74 20 64 61 74 61 2e 0a 20 20 2a output data.. *
0c90: 20 40 70 72 65 20 20 20 20 54 68 65 20 76 61 6c @pre The val
0ca0: 75 65 20 6f 66 20 68 61 73 68 62 69 74 6c 65 6e ue of hashbitlen
0cb0: 20 6d 75 73 74 20 62 65 20 6f 6e 65 20 6f 66 20 must be one of
0cc0: 32 32 34 2c 20 32 35 36 2c 20 33 38 34 20 61 6e 224, 256, 384 an
0cd0: 64 20 35 31 32 2e 0a 20 20 2a 20 40 72 65 74 75 d 512.. * @retu
0ce0: 72 6e 20 53 55 43 43 45 53 53 20 69 66 20 73 75 rn SUCCESS if su
0cf0: 63 63 65 73 73 66 75 6c 2c 20 42 41 44 5f 48 41 ccessful, BAD_HA
0d00: 53 48 4c 45 4e 20 69 66 20 74 68 65 20 76 61 6c SHLEN if the val
0d10: 75 65 20 6f 66 20 68 61 73 68 62 69 74 6c 65 6e ue of hashbitlen
0d20: 20 69 73 20 69 6e 63 6f 72 72 65 63 74 2e 0a 20 is incorrect..
0d30: 20 2a 2f 0a 48 61 73 68 52 65 74 75 72 6e 20 48 */.HashReturn H
0d40: 61 73 68 28 69 6e 74 20 68 61 73 68 62 69 74 6c ash(int hashbitl
0d50: 65 6e 2c 20 63 6f 6e 73 74 20 42 69 74 53 65 71 en, const BitSeq
0d60: 75 65 6e 63 65 20 2a 64 61 74 61 2c 20 44 61 74 uence *data, Dat
0d70: 61 4c 65 6e 67 74 68 20 64 61 74 61 62 69 74 6c aLength databitl
0d80: 65 6e 2c 20 42 69 74 53 65 71 75 65 6e 63 65 20 en, BitSequence
0d90: 2a 68 61 73 68 76 61 6c 29 3b 0a 0a 23 65 6e 64 *hashval);..#end
0da0: 69 66 0a if.