Sha256: 6201e8f6bfc442c4340c79767f5a2a4195368a2ff1a408357b731775dd4522b2

Contents?: true

Size: 1.6 KB

Versions: 5

Compression:

Stored size: 1.6 KB

Contents

/*
Implementation by the Keccak, Keyak and Ketje Teams, namely, Guido Bertoni,
Joan Daemen, Michaƫl Peeters, Gilles Van Assche and Ronny Van Keer, hereby
denoted as "the implementer".

For more information, feedback or questions, please refer to our websites:
http://keccak.noekeon.org/
http://keyak.noekeon.org/
http://ketje.noekeon.org/

To the extent possible under law, the implementer has waived all copyright
and related or neighboring rights to the source code in this file.
http://creativecommons.org/publicdomain/zero/1.0/
*/

#ifndef _KeccakSpongeCommon_h_
#define _KeccakSpongeCommon_h_

#include <string.h>
#include "align.h"

#define KCP_DeclareSpongeStructure(prefix, size, alignment) \
    ALIGN(alignment) typedef struct prefix##_SpongeInstanceStruct { \
        unsigned char state[size]; \
        unsigned int rate; \
        unsigned int byteIOIndex; \
        int squeezing; \
    } prefix##_SpongeInstance;

#define KCP_DeclareSpongeFunctions(prefix) \
    int prefix##_Sponge(unsigned int rate, unsigned int capacity, const unsigned char *input, size_t inputByteLen, unsigned char suffix, unsigned char *output, size_t outputByteLen); \
    int prefix##_SpongeInitialize(prefix##_SpongeInstance *spongeInstance, unsigned int rate, unsigned int capacity); \
    int prefix##_SpongeAbsorb(prefix##_SpongeInstance *spongeInstance, const unsigned char *data, size_t dataByteLen); \
    int prefix##_SpongeAbsorbLastFewBits(prefix##_SpongeInstance *spongeInstance, unsigned char delimitedData); \
    int prefix##_SpongeSqueeze(prefix##_SpongeInstance *spongeInstance, unsigned char *data, size_t dataByteLen);

#endif

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
digest-kangarootwelve-0.2.0 ext/digest/kangarootwelve/KeccakSponge-common.h
digest-kangarootwelve-0.1.1 ext/digest/kangarootwelve/KeccakSponge-common.h
digest-kangarootwelve-0.1.0 ext/digest/kangarootwelve/KeccakSponge-common.h
digest-kangarootwelve-0.0.2 ext/digest/kangarootwelve/KeccakSponge-common.h
digest-kangarootwelve-0.0.1 ext/digest/kangarootwelve/KeccakSponge-common.h