gua64 0.0.6

六十四卦編碼,rust實現 如:“hello,世界”會編碼為“䷯䷬䷿䷶䷸䷬䷀䷌䷌䷎䷼䷲䷰䷳䷸䷘䷔䷭䷒〇”
Documentation
  • Coverage
  • 0%
    0 out of 8 items documented0 out of 5 items with examples
  • Size
  • Source code size: 73.1 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.41 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 15s Average build duration of successful builds.
  • all releases: 14s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Documentation
  • lizongying/rs-gua64
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • lizongying

六十四卦編碼

六十四卦編碼,rust實現

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

github

crates

demo

各語言實現

引用

cargo add gua64

or

[dependencies]
gua64 = "0.0.6"

or

gua64 = { version = "0.0.6", registry = "crates.io" }

or

gua64 = { git = "https://github.com/lizongying/rs-gua64.git" }

示例

cargo run --example basic_example

or

use 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);
}
cargo run

讚賞

image