Fix issues during package import from remote repository

This commit is contained in:
euphoria_laxis 2022-12-04 02:38:32 +01:00
parent 777df254d5
commit bdbfc73e00
4 changed files with 9 additions and 9 deletions

View File

@ -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
View File

@ -1,4 +1,4 @@
module argon2_utils
module github.com/euphoria-laxis/argon2
go 1.19

View File

@ -1,4 +1,4 @@
package argon2_utils
package utils
import (
"crypto/rand"

View File

@ -1,4 +1,4 @@
package argon2_utils
package utils
import "errors"