Fix issues during package import from remote repository
This commit is contained in:
parent
777df254d5
commit
bdbfc73e00
|
@ -1,7 +1,7 @@
|
|||
package _tests
|
||||
|
||||
import (
|
||||
"argon2_utils"
|
||||
"github.com/euphoria-laxis/argon2/utils"
|
||||
"log"
|
||||
"testing"
|
||||
)
|
||||
|
@ -12,12 +12,12 @@ var (
|
|||
|
||||
func TestHashStringArgon2(t *testing.T) {
|
||||
var err error
|
||||
randomString, err = argon2_utils.RandomString(32)
|
||||
randomString, err = utils.RandomString(32)
|
||||
if err != nil {
|
||||
log.Print(err)
|
||||
t.Fail()
|
||||
}
|
||||
hashedString, err = argon2_utils.HashStringArgon2(randomString)
|
||||
hashedString, err = utils.HashStringArgon2(randomString)
|
||||
if err != nil {
|
||||
log.Print(err)
|
||||
t.Fail()
|
||||
|
@ -25,7 +25,7 @@ func TestHashStringArgon2(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestCompareStringToArgon2Hash(t *testing.T) {
|
||||
match, err := argon2_utils.CompareStringToArgon2Hash(randomString, hashedString)
|
||||
match, err := utils.CompareStringToArgon2Hash(randomString, hashedString)
|
||||
if err != nil {
|
||||
log.Print(err)
|
||||
t.Fail()
|
||||
|
@ -35,12 +35,12 @@ func TestCompareStringToArgon2Hash(t *testing.T) {
|
|||
log.Println("passwords should match")
|
||||
t.Fail()
|
||||
}
|
||||
randomString, err = argon2_utils.RandomString(32)
|
||||
randomString, err = utils.RandomString(32)
|
||||
if err != nil {
|
||||
log.Print(err)
|
||||
t.Fail()
|
||||
}
|
||||
match, err = argon2_utils.CompareStringToArgon2Hash(randomString, hashedString)
|
||||
match, err = utils.CompareStringToArgon2Hash(randomString, hashedString)
|
||||
if err != nil {
|
||||
log.Print(err)
|
||||
t.Fail()
|
||||
|
|
2
go.mod
2
go.mod
|
@ -1,4 +1,4 @@
|
|||
module argon2_utils
|
||||
module github.com/euphoria-laxis/argon2
|
||||
|
||||
go 1.19
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package argon2_utils
|
||||
package utils
|
||||
|
||||
import (
|
||||
"crypto/rand"
|
|
@ -1,4 +1,4 @@
|
|||
package argon2_utils
|
||||
package utils
|
||||
|
||||
import "errors"
|
||||
|
Loading…
Reference in New Issue
Block a user