解密
(content string, key string)
| 41 | |
| 42 | // 解密 |
| 43 | func Decrypt(content string, key string) string { |
| 44 | bytes := decrypt([]byte(content), key) |
| 45 | return string(bytes) |
| 46 | } |
| 47 | |
| 48 | func encrypt(data []byte, passphrase string) []byte { |
| 49 | block, _ := aes.NewCipher([]byte(createHash(passphrase))) |