Crates.io | iso8583_parser |
lib.rs | iso8583_parser |
version | 0.2.3 |
source | src |
created_at | 2024-01-21 11:09:15.742157 |
updated_at | 2024-11-26 05:44:48.371685 |
description | An ISO8583 Message Parser |
homepage | |
repository | https://github.com/HosseinAssaran/ISO8583-Parser |
max_upload_size | |
id | 1107501 |
size | 137,199 |
This Rust program parses ISO8583 messages in hex string format and extracts specific fields. It provides multiple interfaces including a GUI, CLI, and a library for integration into other projects.
cargo run --bin iso8583_parser_gui
git clone https://github.com/HosseinAssaran/ISO8583-Parser
cd ISO8583-Parser
cargo run -- --message <hex-message> [--including-header-length] [--tlv-private] [--ltv-private]
Or run without arguments to use interactive mode:
cargo run
.\iso_parser_downloader.bat
php -S localhost:12345
localhost:12345
Important Note: As the PHP Web server uses a rust program to parse the message, you will need it. You can achieve this program by building release of the rust written program from the source or you can downlaod the executable file with iso_parser_downloader.
Cargo.toml
:[dependencies]
iso8583_parser = "0.1.12"
use iso8583_parser::{parse_iso8583, StringManipulation};
fn main() {
let message = "0100..."; // Your ISO8583 message in hex
let result = parse_iso8583(
message,
false, // including_header_length
false, // tlv_private
false // ltv_private
);
match result {
Ok(parsed) => {
println!("MTI: {}", parsed.mti);
println!("Bitmap: {:?}", parsed.bitmap);
// ... process other fields
},
Err(e) => println!("Error parsing message: {}", e),
}
}
Run the test suite:
cargo test
Build optimized binaries:
cargo build --release
This will create optimized executables in the target/release
directory:
iso8583_parser
- CLI applicationiso8583_parser_gui
- GUI applicationLicensed under either of:
Contributions are welcome! Please feel free to submit a Pull Request.