Data scrubbing options for protecting sensitive data https://godoc.org/maze.io/x/scrub
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
571 B

package scrub
import "regexp"
var (
// PEMDHParameters scrubs a PEM DH PARAMETERS block retaining its original length.
PEMDHParameters = regexpScrubber{
pattern: regexp.MustCompile(`(?s)-----BEGIN DH PARAMETERS-----\n([+0-9a-zA-Z/\n]+)\n-----END DH PARAMETERS`),
equalLength: true,
}
// PEMPrivateKey scrubs a PEM PRIVATE KEY block retaining its original length.
PEMPrivateKey = regexpScrubber{
pattern: regexp.MustCompile(`(?s)-----BEGIN (?:[A-Z]+ )PRIVATE KEY-----\n([+0-9a-zA-Z/\n]+)\n-----END (?:[A-Z]+ )PRIVATE KEY`),
equalLength: true,
}
)