类别:CODES / 源码 / 日期:2020-05-14 / 浏览:4877 / 评论:1
#csv_main.go
package main import ( "fmt" "path/filepath" "os" "log" "bytes" ) func main() { fmt.Println(filepath.Abs("./")) decrypt() } func qqx5_csv_bin() { x5binBytes, err := CompressToBytes("./qqx5_csv_bin") var aesKey = []byte("12345678901234561234567890123456") pass := x5binBytes xpass, err := Aesqqx5_csv_bin(pass, aesKey) if err != nil { fmt.Println(err) return } fd, err := os.Create("./csv.bin") if err != nil { log.Fatal(err) } fd.Write(xpass) fd.Close() } func decrypt() { var aesKey = []byte("12345678901234561234567890123456") fd, err := os.Open("./csv.bin") if err != nil { log.Fatal(err) } buff := new(bytes.Buffer) _, err = buff.ReadFrom(fd) fd.Close() if err != nil { log.Fatal(err) } tpass, err := AesDecrypt(buff.Bytes(), aesKey) if err != nil { fmt.Println(err) return } //fmt.Printf("解析后: %s\n", tpass) fd, err = os.Create(".csv") if err != nil { log.Fatal(err) } fd.Write(tpass) fd.Close() }
demo.py运行的时候报了一个错误,有兴趣的可以研究一下。
Exception in Tkinter callback Traceback (most recent call last): File "C:\Files\Python27\lib\lib-tk\Tkinter.py", line 1547, in __call__return self.func(*args) File "D:\Bogie\开源代码\例子\CSV\csv.bin\demo.py", line 40, in single_convertself.do_convert_base(filename) TypeError: do_convert_base() takes exactly 2 arguments (1 given)
版权声明 : 本文未使用任何知识共享协议授权,您可以任何形式自由转载或使用 / Article Is Not Licensed Under Any Creative Commons License, And You May Freely Reprint Or Use It In Any Form
共有 1 条评论
不错啊
发表评论 / 取消回复