mirror of
https://github.com/stakater/Reloader.git
synced 2026-08-21 13:06:34 +00:00
16 lines
306 B
Go
16 lines
306 B
Go
package crypto
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
// TestGenerateSHA generates the sha from given data and verifies whether it is correct or not
|
|
func TestGenerateSHA(t *testing.T) {
|
|
data := "www.stakater.com"
|
|
sha := GenerateSHA(data)
|
|
length := len(sha)
|
|
if length != 40 {
|
|
t.Errorf("Failed to generate SHA")
|
|
}
|
|
}
|