improved code for token checksum calc

This commit is contained in:
Pascal Fischer
2023-03-03 14:51:33 +01:00
parent e0fc779f58
commit b3f339c753
2 changed files with 2 additions and 18 deletions

View File

@@ -31,8 +31,7 @@ func TestPAT_GenerateToken_Checksum(t *testing.T) {
token := tokenWithoutPrefix[:len(tokenWithoutPrefix)-6]
tokenCheckSum := tokenWithoutPrefix[len(tokenWithoutPrefix)-6:]
crc32q := crc32.MakeTable(IEEE)
expectedChecksum := crc32.Checksum([]byte(token), crc32q)
expectedChecksum := crc32.ChecksumIEEE([]byte(token))
actualChecksum, err := base62.Decode(tokenCheckSum)
if err != nil {
t.Fatal(err)