Debian Codegraph @

age/internal/tests/armor_pgp_checksum.go

raw symbols SCIP
1 // Copyright 2022 The age Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 //go:build ignore
6 // +build ignore
7
8 package main
9
10 import (
11 "c2sp.org/CCTV/age/internal/testkit"
12 "golang.org/x/crypto/openpgp/armor"
13 )
14
15 func main() {
16 f := testkit.NewTestFile()
17 f.VersionLine("v1")
18 f.X25519(testkit.TestX25519Identity)
19 f.HMAC()
20 f.Payload("age")
21 file := f.Bytes()
22 f.Buf.Reset()
23 w, _ := armor.Encode(&f.Buf, "AGE ENCRYPTED FILE", nil)
24 w.Write(file)
25 w.Close()
26 f.Buf.WriteString("\n")
27 f.ExpectArmorFailure()
28 f.Generate()
29 }