(ciphertext []byte, blocksize int)
| 183 | return strings.Replace(dir, "\\", "/", -1) |
| 184 | } |
| 185 | func PKCS7Padding(ciphertext []byte, blocksize int) []byte { |
| 186 | padding := blocksize - len(ciphertext)%blocksize |
| 187 | padtext := bytes.Repeat([]byte{byte(padding)}, padding) |
| 188 | return append(ciphertext, padtext...) |
| 189 | } |
| 190 | |
| 191 | func AesEncrypt(orig string, key string) string { |
| 192 | origData := []byte(orig) |