change RP interfaces

This commit is contained in:
Livio Amstutz 2020-09-14 07:52:16 +02:00
parent ed6cbe4fe2
commit 45230569d3
10 changed files with 529 additions and 259 deletions

View file

@ -24,7 +24,8 @@ func GetHashAlgorithm(sigAlgorithm jose.SignatureAlgorithm) (hash.Hash, error) {
}
func HashString(hash hash.Hash, s string, firstHalf bool) string {
hash.Write([]byte(s)) // hash documents that Write will never return an error
//nolint:errcheck
hash.Write([]byte(s))
size := hash.Size()
if firstHalf {
size = size / 2