Hash App token (#6724)

This commit is contained in:
techknowlogick 2019-05-04 11:45:34 -04:00 committed by GitHub
parent 1fa9662946
commit 46373e7657
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 239 additions and 44 deletions

View file

@ -53,6 +53,13 @@ func TestEncodeSha1(t *testing.T) {
)
}
func TestEncodeSha256(t *testing.T) {
assert.Equal(t,
"c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2",
EncodeSha256("foobar"),
)
}
func TestShortSha(t *testing.T) {
assert.Equal(t, "veryverylo", ShortSha("veryverylong"))
}