Constant SHA2

Source
pub const SHA2: Constraint;
Expand description

§Sha256

0x50: SHA2

Produce a SHA 256 hash from the specified data.

Hashes are byte aligned so length is number of bytes not number of words.

§Stack Input

[data, data_len]

§Stack Output

[hash_w0, hash_w1, hash_w2, hash_w3]

§Panics

  • data_len * 8 is longer than the data.