use const and do array copy

This commit is contained in:
Pascal Fischer
2023-03-08 11:54:10 +01:00
parent 2b1965c941
commit b4bb5c6bb8
5 changed files with 17 additions and 4 deletions

View File

@@ -19,7 +19,7 @@ func TestPAT_GenerateToken_Hashing(t *testing.T) {
func TestPAT_GenerateToken_Prefix(t *testing.T) {
_, plainToken, _ := generateNewToken()
fourCharPrefix := plainToken[:4]
assert.Equal(t, "nbp_", fourCharPrefix)
assert.Equal(t, PATPrefix, fourCharPrefix)
}
func TestPAT_GenerateToken_Checksum(t *testing.T) {