core_crypto/
hashes.rs

1// Copyright 2021 BlockPuppets developers.
2//
3// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6// option. This file may not be copied, modified, or distributed
7// except according to those terms.
8
9use super::{KEY_BYTES_SIZE, KEYPAIR_LENGTH};
10
11pub type AesKey = H256;
12pub type SharedSecret = H256;
13
14construct_fixed_hash! {
15    /// 256 bit hash type.
16    pub struct H256(KEY_BYTES_SIZE);
17}
18
19construct_fixed_hash! {
20    /// 512 bit hash type.
21    pub struct H512(KEYPAIR_LENGTH);
22}