aboutsummaryrefslogtreecommitdiffhomepage
path: root/pyecsca/codegen/hash/none.c
blob: b40adc34d293579dd456747ecdef69c14d9e459b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "hash.h"

#include <string.h>
#include <stdint.h>

int hash_size(int input_size) {
    return input_size;
}

void *hash_new_ctx(void) {
    return NULL;
}

void hash_init(void *ctx) {

}

void hash_final(void *ctx, int size, const uint8_t *msg, uint8_t *digest) {
    memcpy(digest, msg, size);
}

void hash_free_ctx(void *ctx) {

}