simfony_as_rust/jet/
hash_functions.rs

1/* This file has been automatically generated. */
2
3//! # Hash functions
4//!
5//! This module defines jets for computing SHA-256 hashes.
6//! Be aware that SHA-256 padding isn't provided and messages should be manually padded.
7
8#![allow(unused)]
9#![allow(clippy::complexity)]
10
11use super::*;
12
13/// Update the given 256-bit midstate by running the SHA256 block compression function, using the given 512-bit block.
14///
15/// ## Cost
16///
17/// 771 mWU _(milli weight units)_
18pub fn sha_256_block(a: u256, b: u256, c: u256) -> u256 {
19    todo!()
20}
21
22/// Add 1   byte  to the SHA256 hash engine.
23///
24/// ## Cost
25///
26/// 642 mWU _(milli weight units)_
27pub fn sha_256_ctx_8_add_1(a: Ctx8, b: u8) -> Ctx8 {
28    todo!()
29}
30
31/// Add 2   bytes to the SHA256 hash engine.
32///
33/// ## Cost
34///
35/// 661 mWU _(milli weight units)_
36pub fn sha_256_ctx_8_add_2(a: Ctx8, b: u16) -> Ctx8 {
37    todo!()
38}
39
40/// Add 4   bytes to the SHA256 hash engine.
41///
42/// ## Cost
43///
44/// 645 mWU _(milli weight units)_
45pub fn sha_256_ctx_8_add_4(a: Ctx8, b: u32) -> Ctx8 {
46    todo!()
47}
48
49/// Add 8   bytes to the SHA256 hash engine.
50///
51/// ## Cost
52///
53/// 674 mWU _(milli weight units)_
54pub fn sha_256_ctx_8_add_8(a: Ctx8, b: u64) -> Ctx8 {
55    todo!()
56}
57
58/// Add 16  bytes to the SHA256 hash engine.
59///
60/// ## Cost
61///
62/// 747 mWU _(milli weight units)_
63pub fn sha_256_ctx_8_add_16(a: Ctx8, b: u128) -> Ctx8 {
64    todo!()
65}
66
67/// Add 32  bytes to the SHA256 hash engine.
68///
69/// ## Cost
70///
71/// 896 mWU _(milli weight units)_
72pub fn sha_256_ctx_8_add_32(a: Ctx8, b: u256) -> Ctx8 {
73    todo!()
74}
75
76/// Add 64  bytes to the SHA256 hash engine.
77///
78/// ## Cost
79///
80/// 1187 mWU _(milli weight units)_
81pub fn sha_256_ctx_8_add_64(a: Ctx8, b: [u8; 64]) -> Ctx8 {
82    todo!()
83}
84
85/// Add 128 bytes to the SHA256 hash engine.
86///
87/// ## Cost
88///
89/// 1779 mWU _(milli weight units)_
90pub fn sha_256_ctx_8_add_128(a: Ctx8, b: [u8; 128]) -> Ctx8 {
91    todo!()
92}
93
94/// Add 256 bytes to the SHA256 hash engine.
95///
96/// ## Cost
97///
98/// 2912 mWU _(milli weight units)_
99pub fn sha_256_ctx_8_add_256(a: Ctx8, b: [u8; 256]) -> Ctx8 {
100    todo!()
101}
102
103/// Add 512 bytes to the SHA256 hash engine.
104///
105/// ## Cost
106///
107/// 5299 mWU _(milli weight units)_
108pub fn sha_256_ctx_8_add_512(a: Ctx8, b: [u8; 512]) -> Ctx8 {
109    todo!()
110}
111
112/// Add a list of less than 512 bytes to the SHA256 hash engine.
113///
114/// ## Cost
115///
116/// 5060 mWU _(milli weight units)_
117pub fn sha_256_ctx_8_add_buffer_511(a: Ctx8, b: List<u8, 512>) -> Ctx8 {
118    todo!()
119}
120
121/// Produce a hash from the current state of the SHA256 hash engine.
122///
123/// ## Cost
124///
125/// 835 mWU _(milli weight units)_
126pub fn sha_256_ctx_8_finalize(a: Ctx8) -> u256 {
127    todo!()
128}
129
130/// Initialize a default SHA256 hash engine.
131///
132/// ## Cost
133///
134/// 118 mWU _(milli weight units)_
135pub fn sha_256_ctx_8_init() -> Ctx8 {
136    todo!()
137}
138
139/// Return the SHA256 initial value.
140///
141/// ## Cost
142///
143/// 93 mWU _(milli weight units)_
144pub fn sha_256_iv() -> u256 {
145    todo!()
146}