core_crypto/constants.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
9/// The length Symbol Aes IV in bytes.
10pub const SYM_AES_IV_LENGTH: usize = 12;
11
12/// The length Nis1 Aes IV in bytes.
13pub const NIS_AES_IV_LENGTH: usize = 16;
14
15/// The length Nis1 Salt in bytes.
16pub const NIS_SALT_LENGTH: usize = 32;
17
18/// The length Symbol Aes Tag in bytes.
19pub const AES_TAG_LENGTH: usize = 16;
20
21/// The length of an key in bytes.
22pub const KEY_BYTES_SIZE: usize = 32;
23
24/// The length of an key in str.
25pub const KEY_STR_SIZE: usize = 64;
26
27/// The length of an `Signature` in bytes.
28pub const SIGNATURE_LENGTH: usize = 64;
29
30/// The length of an `Keypair` in bytes.
31pub const KEYPAIR_LENGTH: usize = KEY_BYTES_SIZE + KEY_BYTES_SIZE;