// Copyright (c) 2012-2013 The Cryptonote developers1// Distributed under the MIT/X11 software license, see the accompanying2// file COPYING or http://www.opensource.org/licenses/mit-license.php.34#include <stddef.h>5#include <stdint.h>6#include <string.h>78#include "hash-ops.h"9#include "c_keccak.h"1011void hash_permutation(union hash_state *state) {12keccakf((uint64_t*)state, 24);13}1415void hash_process(union hash_state *state, const uint8_t *buf, int count) {16keccak1600(buf, count, (uint8_t*)state);17}1819void cn_fast_hash(const void *data, int len, char *hash) {20union hash_state state;21hash_process(&state, data, len);22memcpy(hash, &state, HASH_SIZE);23}242526