mirror of
https://gitee.com/johng/gf.git
synced 2024-12-02 20:28:17 +08:00
24 lines
417 B
Go
24 lines
417 B
Go
package main
|
|
|
|
import (
|
|
"github.com/gogf/gf/v2/crypto/gaes"
|
|
"github.com/gogf/gf/v2/os/gfile"
|
|
"github.com/gogf/gf/v2/os/gres"
|
|
)
|
|
|
|
var (
|
|
CryptoKey = []byte("x76cgqt36i9c863bzmotuf8626dxiwu0")
|
|
)
|
|
|
|
func main() {
|
|
binContent := gfile.GetBytes("data.bin")
|
|
binContent, err := gaes.Decrypt(binContent, CryptoKey)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
if err := gres.Add(binContent); err != nil {
|
|
panic(err)
|
|
}
|
|
gres.Dump()
|
|
}
|