mirror of
https://github.com/stakater/Reloader.git
synced 2026-03-03 01:40:18 +00:00
16 lines
341 B
Go
16 lines
341 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 := "abd4ed82fb04548388a6cf3c339fd9dc84d275df"
|
|
result := GenerateSHA(data)
|
|
if result != sha {
|
|
t.Errorf("Failed to generate SHA")
|
|
}
|
|
}
|