目录
目录README.md

六十四卦編碼

六十四卦編碼,golang實現

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

go-gua64

demo

All language

Download

releases

History

History

Usage

  • -e Input the string to be encoded

    gua64 -e 123   
    # output: ䷽䷺䷎䷼
  • -d Input the string to be decoded

    gua64 -d ䷽䷺䷎䷼   
    # output: 123
  • -v Input the string and judge whether it is gua64

    gua64 -v ䷽䷺䷎䷼   
    # output: true
  • -o Specify the path of the output file

    gua64 -e 123 -o encode.txt   
  • -f Indicate whether the input is a file

    gua64 -f -d encode.txt -o decode.txt  
    
    gua64 -f -d decode.txt -o encode.txt    
  • -h Show help information

    gua64 -h 
  • -version Show version information

    gua64 -version

Build

make

Docker image

ghcr.io

hub.docker.com

Some sample in Golang

sample

Document

document

Install

go get github.com/lizongying/go-gua64
package main

import (
    "fmt"
    "github.com/lizongying/go-gua64/gua64"
)

// go run sample/main.go
func main() {
    g := gua64.NewGua64()
    fmt.Println(g.Encode([]byte(`hello,世界`)))
    fmt.Println(string(g.Decode(`䷯䷬䷿䷶䷸䷬䷀䷌䷌䷎䷼䷲䷰䷳䷸䷘䷔䷭䷒〇`)))
    fmt.Println(g.Verify(`䷯䷬䷿䷶䷸䷬䷀䷌䷌䷎䷼䷲䷰䷳䷸䷘䷔䷭䷒〇`))
}

讚賞

image

关于

六十四卦编码,golang实现。 如:“hello,世界”会编码为“䷯䷬䷿䷶䷸䷬䷀䷌䷌䷎䷼䷲䷰䷳䷸䷘䷔䷭䷒〇”。

105.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号