]> Git Repo - cpuminer-multi.git/blame - crypto/hash.c
update build.sh
[cpuminer-multi.git] / crypto / hash.c
CommitLineData
c0642086 1// Copyright (c) 2012-2013 The Cryptonote developers
2// Distributed under the MIT/X11 software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5#include <stddef.h>
6#include <stdint.h>
7#include <string.h>
8
9#include "hash-ops.h"
10#include "c_keccak.h"
11
12void hash_permutation(union hash_state *state) {
13 keccakf((uint64_t*)state, 24);
14}
15
8f52f406 16void hash_process(union hash_state *state, const uint8_t *buf, int count) {
c0642086 17 keccak1600(buf, count, (uint8_t*)state);
18}
19
8f52f406 20void cn_fast_hash(const void *data, int len, char *hash) {
c0642086 21 union hash_state state;
8f52f406 22 hash_process(&state, data, len);
c0642086 23 memcpy(hash, &state, HASH_SIZE);
24}
This page took 0.025936 seconds and 4 git commands to generate.