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
44
45
46
use fmt;
use Ripemd160;
use ;
/// Write the provided bytes as uppercase hexadecimal into the supplied formatter.
pub
/// Return the provided bytes encoded as an uppercase hexadecimal string.
pub
/// Convenience helper used when rendering script hashes or method token hashes.
pub
/// Return the provided bytes encoded as uppercase hexadecimal after flipping endianness.
pub
/// Compute the Neo Hash160 (`RIPEMD160(SHA256(data))`) and return the
/// little-endian bytes.
///
/// The raw `RIPEMD160(SHA256(..))` digest IS Neo's internal little-endian
/// `UInt160` byte order — the explorer/display ("big-endian", `0x`-prefixed)
/// form is this digest reversed. So the digest is returned as-is: callers use
/// [`format_hash`] for the little-endian rendering and [`format_hash_be`] for
/// the display rendering. (Reversing here would invert both, which is exactly
/// the bug this comment exists to prevent.)
pub