OpenCores
URL https://opencores.org/ocsvn/potato/potato/trunk

Subversion Repositories potato

[/] [potato/] [trunk/] [benchmarks/] [sha256/] [sha256.h] - Blame information for rev 19

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 13 skordal
// The Potato Processor Benchmark Applications
2
// (c) Kristian Klomsten Skordal 2015 <kristian.skordal@wafflemail.net>
3
// Report bugs and issues on <http://opencores.org/project,potato,bugtracker>
4
 
5
#ifndef SHA256_H
6
#define SHA256_H
7
 
8
#include <stdint.h>
9
 
10
struct sha256_context
11
{
12
        uint32_t intermediate[8];
13
};
14
 
15
// Resets a SHA256 context:
16
void sha256_reset(struct sha256_context * ctx);
17
 
18
// Hash a block of data:
19
void sha256_hash_block(struct sha256_context * ctx, const uint32_t * data);
20
 
21
// Pad a block of data to hash:
22
void sha256_pad_le_block(uint8_t * block, int block_length, uint64_t total_length);
23
 
24
// Get the hash from a SHA256 context:
25
void sha256_get_hash(const struct sha256_context * ctx, uint8_t * hash);
26
 
27
// Formats a hash for printing:
28
void sha256_format_hash(const uint8_t * hash, char * output);
29
 
30
#endif
31
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.