36 lines
859 B
Go
36 lines
859 B
Go
// go: ignore
|
|
package main
|
|
|
|
// import (
|
|
// "encoding/hex"
|
|
// "fmt"
|
|
// "time"
|
|
|
|
// "github.com/zeevdiukman/z/crypt"
|
|
// "github.com/zeevdiukman/z/helper"
|
|
// )
|
|
|
|
// func main() {
|
|
// t := time.Now()
|
|
// key := "1b1ef1cf714a412d57ec7be1647e6e1e7f8141a1cd009dd13b52041e5c62dbd6"
|
|
// keyBytes, _ := hex.DecodeString(key)
|
|
// plaintext := "hello, world!"
|
|
// encryptedText, err := crypt.Encrypt(plaintext, keyBytes)
|
|
|
|
// if err != nil {
|
|
// fmt.Println("Error encrypting:", err)
|
|
// return
|
|
// }
|
|
// decryptedText, err := crypt.Decrypt(encryptedText, keyBytes)
|
|
// if err != nil {
|
|
// fmt.Println("Error decrypting:", err)
|
|
// return
|
|
// }
|
|
// tt := time.Since(t)
|
|
|
|
// fmt.Println("Key:", key)
|
|
// fmt.Println("Encrypted:", encryptedText)
|
|
// fmt.Println("Decrypted:", decryptedText)
|
|
// fmt.Println("Generated in", tt)
|
|
// helper.PrintOldStyleMetrics()
|
|
// }
|