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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
//! # Neo Crypto (v0.1.8)
//!
//! Cryptographic utilities for the Neo N3 blockchain.
//!
//! ## Overview
//!
//! The neo_crypto module provides cryptographic primitives and utilities for working with
//! the Neo N3 blockchain. It includes:
//!
//! - Key pair generation and management
//! - Cryptographic signing and verification
//! - Hashing functions (SHA256, RIPEMD160, etc.)
//! - Base58 encoding and decoding
//! - WIF (Wallet Import Format) utilities
//! - Secure random number generation
//! - Encryption and decryption utilities
//!
//! This module forms the cryptographic foundation for wallet management, transaction signing,
//! and secure communication within the Neo N3 ecosystem.
//!
//! ## Examples
//!
//! ### Creating a key pair
//!
//! ```rust,no_run
//! use neo3::neo_crypto::KeyPair;
//!
//! // Generate a new random key pair
//! let key_pair = KeyPair::new_random();
//! println!("Public key: {:?}", key_pair.public_key());
//! println!("Private key: {:?}", key_pair.private_key());
//!
//! // Create a key pair from a private key (32 bytes)
//! let private_key_bytes = [1u8; 32]; // Replace with actual private key bytes
//! let key_pair = KeyPair::from_private_key(&private_key_bytes).unwrap();
//! ```
//!
//! ### Signing and verifying data
//!
//! ```ignore
//! use neo3::neo_crypto::KeyPair;
//!
//! // Generate a key pair
//! let key_pair = KeyPair::new_random();
//!
//! // Data to sign
//! let data = b"Hello, Neo!";
//!
//! // Sign the data
//! let signature = key_pair.sign(data).unwrap();
//!
//! // Verify the signature
//! let is_valid = key_pair.verify_signature(data, &signature).unwrap();
//! assert!(is_valid);
//! ```
//!
//! ### Working with WIF format
//!
//! ```rust,no_run
//! use neo3::neo_crypto::KeyPair;
//!
//! // Import a private key from WIF format
//! let wif = "KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU73sVHnoWn";
//! let key_pair = KeyPair::from_wif(wif).unwrap();
//!
//! // Export a private key to WIF format
//! let exported_wif = key_pair.export_as_wif();
//! assert_eq!(wif, exported_wif);
//! ```
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
// Re-export important types
pub use CryptoError;
pub use HashableForVec;
pub use KeyPair;
pub use ;
pub