feat: init commit
This commit is contained in:
35
main.go
Normal file
35
main.go
Normal file
@@ -0,0 +1,35 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"encoding/hex"
|
||||
"crypto/aes"
|
||||
"github.com/spf13/afero"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Println("Hello Go.")
|
||||
osFs := afero.NewOsFs()
|
||||
fmt.Println(osFs)
|
||||
|
||||
key := []byte {
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
}
|
||||
cipher, err := aes.NewCipher(key)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return
|
||||
}
|
||||
|
||||
dest := []byte {
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
}
|
||||
src := []byte {
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
}
|
||||
cipher.Encrypt(dest, src)
|
||||
|
||||
fmt.Println(hex.EncodeToString(key))
|
||||
fmt.Println(hex.EncodeToString(src))
|
||||
fmt.Println(hex.EncodeToString(dest))
|
||||
}
|
||||
Reference in New Issue
Block a user