Awesome
六十四卦编码
六十四卦编码,golang实现。 如:“hello,世界”会编码为“䷯䷬䷿䷶䷸䷬䷀䷌䷌䷎䷼䷲䷰䷳䷸䷘䷔䷭䷒〇”。
All language
Download
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
Some sample in Golang
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(`䷯䷬䷿䷶䷸䷬䷀䷌䷌䷎䷼䷲䷰䷳䷸䷘䷔䷭䷒〇`))
}