#demo #六十四卦編碼,rust實現 #如:“hello,世界”會編碼為“䷯䷬䷿䷶䷸䷬䷀䷌䷌䷎䷼䷲䷰䷳䷸䷘䷔䷭䷒〇”

bin+lib gua64

六十四卦編碼,rust實現 如:“hello,世界”會編碼為“䷯䷬䷿䷶䷸䷬䷀䷌䷌䷎䷼䷲䷰䷳䷸䷘䷔䷭䷒〇”

1 unstable release

Uses new Rust 2024

new 0.0.5 Mar 10, 2025

#27 in #demo

Download history 53/week @ 2025-03-05

53 downloads per month

MIT license

47KB
98 lines

六十四卦編碼

六十四卦編碼,rust實現

如:“hello,世界”會編碼為“䷯䷬䷿䷶䷸䷬䷀䷌䷌䷎䷼䷲䷰䷳䷸䷘䷔䷭䷒〇”

crates

demo

各語言實現

引用

[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);
}

讚賞

image

No runtime deps