Sha256: a46a114d1f80e037319b630be8a55512ced1b571f28372a7fd6fa225d46689a0

Contents?: true

Size: 524 Bytes

Versions: 8

Compression:

Stored size: 524 Bytes

Contents

#include <stdio.h>

#include "crypto_uint8.h"

#define TEST_NAME "shorthash"
#include "cmptest.h"

int main(void)
{
#define MAXLEN 64
    crypto_uint8 in[MAXLEN], out[crypto_shorthash_BYTES], k[crypto_shorthash_KEYBYTES];
    size_t i,j;

    for( i = 0; i < crypto_shorthash_KEYBYTES; ++i ) k[i] = i;

    for(i=0;i<MAXLEN;++i) {
        in[i]=i;
        crypto_shorthash( out, in, i, k );
        for (j = 0;j < crypto_shorthash_BYTES;++j) printf("%02x",(unsigned int) out[j]);
        printf("\n");
    }
    return 0;
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rbnacl-libsodium-0.7.0 vendor/libsodium/test/default/shorthash.c
rbnacl-libsodium-0.6.1 vendor/libsodium/test/default/shorthash.c
rbnacl-libsodium-0.6.0 vendor/libsodium/test/default/shorthash.c
rbnacl-libsodium-0.5.0.1 vendor/libsodium/test/default/shorthash.c
rbnacl-libsodium-0.5.0.1.pre vendor/libsodium/test/default/shorthash.c
rbnacl-libsodium-0.5.0 vendor/libsodium/test/default/shorthash.c
rbnacl-libsodium-0.4.5 vendor/libsodium/test/default/shorthash.c
rbnacl-libsodium-0.4.5a vendor/libsodium/test/default/shorthash.c