()
| 175 | } |
| 176 | } |
| 177 | func GetCurrentDirectory() string { |
| 178 | dir, err := filepath.Abs(filepath.Dir(os.Args[0])) |
| 179 | if err != nil { |
| 180 | log.Fatal(err) |
| 181 | } |
| 182 | |
| 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) |