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.

19 lines
440 B

package scrub
import (
"regexp"
)
const (
reCryptHash = `(?s)\$[-0-9a-z]+\$((?:rounds=\d+\$)?(?:` + reBase64 + `+)+\$?)`
)
// Good source of examples can be found here: https://hashcat.net/wiki/doku.php?id=example_hashes
var (
// CryptHash can scrub hashes in common crypt formats, such as Apache and IANA crypt hashes.
CryptHash Scrubber = regexpScrubber{
pattern: regexp.MustCompile(reCryptHash),
equalLength: false,
}
)