gua64

Crates.iogua64
lib.rsgua64
version0.0.5
created_at2025-03-10 13:12:16.797608+00
updated_at2025-03-10 13:12:16.797608+00
description六十四卦編碼,rust實現 如:“hello,世界”會編碼為“䷯䷬䷿䷶䷸䷬䷀䷌䷌䷎䷼䷲䷰䷳䷸䷘䷔䷭䷒〇”
homepagehttps://lizongying.github.io/js-gua64/
repositoryhttps://github.com/lizongying/rs-gua64
max_upload_size
id1586615
size74,161
李宗英 (lizongying)

documentation

https://lizongying.github.io/rs-gua64/

README

六十四卦編碼

六十四卦編碼,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

Commit count: 7

cargo fmt