age: reject leading zeroes and sign in scrypt work factor

This commit is contained in:
Filippo Valsorda
2022-06-19 17:28:39 +02:00
parent 2088adf268
commit 2e090545df
42 changed files with 456 additions and 11 deletions

View File

@@ -6,18 +6,14 @@
package main
import (
"strings"
"filippo.io/age/internal/testkit"
)
import "filippo.io/age/internal/testkit"
func main() {
f := testkit.NewTestFile()
f.VersionLine("v1")
f.X25519(testkit.TestX25519Recipient)
body, args := f.UnreadLine(), f.UnreadLine()
f.TextLine(strings.Replace(args, "X25519", "x25519", -1))
body, args := f.UnreadLine(), f.UnreadArgsLine()
f.ArgsLine("x25519", args[1])
f.TextLine(body)
f.HMAC()
f.Payload("age")