1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 10:18:38 +00:00

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
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"))
}