1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! Some simple functions to transform states and bytes into strings
use crateflip_ordering;
/// prints bytes as hexadecimal values using big endian encoding, adds a space every 4 bytes
///
/// # Examples
/// ```
/// use jisp_sha3::printer::print_bytes_be;
/// let m = vec![1, 2, 3, 4, 5, 6, 7, 8];
/// let s = print_bytes_be(&m);
///
/// assert_eq!(s, "01020304 05060708".to_owned());
/// ```
/// prints bytes as hexadecimal values using little endian encoding, adds a space every 4 bytes
///
/// # Examples
/// ```
/// use jisp_sha3::printer::print_bytes_le;
/// let m = vec![1, 2, 3, 4];
/// let s = print_bytes_le(&m);
///
/// assert_eq!(s, "8040c020".to_owned());
/// ```