| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
package main |
| 9 |
|
| 10 |
import "c2sp.org/CCTV/age/internal/testkit" |
| 11 |
|
| 12 |
func main() { |
| 13 |
f := testkit.NewTestFile() |
| 14 |
f.VersionLine("v1") |
| 15 |
f.X25519(testkit.TestX25519Recipient) |
| 16 |
f.HMAC() |
| 17 |
f.Payload("age") |
| 18 |
file := f.Bytes() |
| 19 |
f.Buf.Reset() |
| 20 |
f.BeginArmor("AGE ENCRYPTED FILE") |
| 21 |
f.Body(file) |
| 22 |
f.Base64Padding() |
| 23 |
line2, line1 := f.UnreadLine(), f.UnreadLine() |
| 24 |
f.TextLine(" " + line1) |
| 25 |
f.TextLine(line2) |
| 26 |
f.EndArmor("AGE ENCRYPTED FILE") |
| 27 |
f.ExpectArmorFailure() |
| 28 |
f.Generate() |
| 29 |
} |