Skip to content

Commit

Permalink
fix(ndsp): fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
nicklasfrahm committed Aug 11, 2022
1 parent 8ebc789 commit e4c84d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/nsdp/crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
// FixedLengthXOR creates a fixed-length XOR encryption of the given data.
// The length of the hash will be the minimum length of the data and the key.
func FixedLengthXOR(data []byte, key []byte) []byte {
// Suprisingly, Golang does not have a built-in `min` function for integers,
// Surprisingly, Golang does not have a built-in `min` function for integers,
// so we have to resort to this ugliness.
length := int(math.Min(float64(len(data)), float64(len(key))))
hash := make([]byte, length)
Expand Down

0 comments on commit e4c84d1

Please sign in to comment.