Skip to content

Commit

Permalink
userhash: remove sql scanning implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
zephyrtronium committed Nov 21, 2024
1 parent 2e88963 commit ac62ba9
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions userhash/hash.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,6 @@ var (
// Hash is an obfuscated hash identifying a user in a location.
type Hash [Size]byte

// Scan implements sql.Scanner.
func (h *Hash) Scan(src any) error {
switch src := src.(type) {
case []byte:
n := copy(h[:], src)
if n != Size {
return ErrShortHash
}
default:
return ErrHashType
}
return nil
}

// A Hasher creates Hash values.
type Hasher struct {
// mac is the HMAC hasher.
Expand Down

0 comments on commit ac62ba9

Please sign in to comment.