| Crates.io | gua64 |
| lib.rs | gua64 |
| version | 0.0.5 |
| created_at | 2025-03-10 13:12:16.797608+00 |
| updated_at | 2025-03-10 13:12:16.797608+00 |
| description | 六十四卦編碼,rust實現 如:“hello,世界”會編碼為“䷯䷬䷿䷶䷸䷬䷀䷌䷌䷎䷼䷲䷰䷳䷸䷘䷔䷭䷒〇” |
| homepage | https://lizongying.github.io/js-gua64/ |
| repository | https://github.com/lizongying/rs-gua64 |
| max_upload_size | |
| id | 1586615 |
| size | 74,161 |
六十四卦編碼,rust實現
如:“hello,世界”會編碼為“䷯䷬䷿䷶䷸䷬䷀䷌䷌䷎䷼䷲䷰䷳䷸䷘䷔䷭䷒〇”

[dependencies]
gua64="0.0.1"
cargo run --example basic_example
use crate::gua64::Gua64;
fn main() {
let gua64 = Gua64::new();
let message = "hello,世界".as_bytes();
println!("Original: {:?}", message);
let encoded = gua64.encode(message);
println!("Encoded: {}", encoded);
let decoded = gua64.decode(&encoded);
println!("Decoded: {:?}", String::from_utf8(decoded).unwrap());
let is_valid = gua64.verify(&encoded);
println!("Is valid: {}", is_valid);
}
