diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 16a4c22..403068c 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,15 +4,11 @@
-
+
+
-
-
-
-
-
-
-
+
+
@@ -79,7 +75,7 @@
-
+
@@ -120,6 +116,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -207,6 +213,7 @@
+
@@ -263,7 +270,9 @@
-
+
+
+
true
diff --git a/go.mod b/go.mod
index b6933e8..bc10f6b 100644
--- a/go.mod
+++ b/go.mod
@@ -1,3 +1,5 @@
module github.com/wneessen/apg-go
go 1.16
+
+require github.com/wneessen/go-hibp v0.0.1
diff --git a/go.sum b/go.sum
new file mode 100644
index 0000000..ae95c0a
--- /dev/null
+++ b/go.sum
@@ -0,0 +1,2 @@
+github.com/wneessen/go-hibp v0.0.1 h1:oZaeSsy1ygufrwh8CI3PWc3XLubaP7erJhZlc1+n6O4=
+github.com/wneessen/go-hibp v0.0.1/go.mod h1:Ldg6DQg4fMCveVKgL+RL9Jy+9TsljjAP704Ix8X3jOw=
diff --git a/hibp/hibp.go b/hibp/hibp.go
deleted file mode 100644
index eda6ef8..0000000
--- a/hibp/hibp.go
+++ /dev/null
@@ -1,45 +0,0 @@
-package hibp
-
-import (
- "bufio"
- "crypto/sha1"
- "fmt"
- "log"
- "net/http"
- "strings"
- "time"
-)
-
-// Check queries the HIBP database and checks if a given string is was found
-func Check(p string) (bool, error) {
- shaSum := fmt.Sprintf("%x", sha1.Sum([]byte(p)))
- firstPart := shaSum[0:5]
- secondPart := shaSum[5:]
- isPwned := false
-
- httpClient := &http.Client{Timeout: time.Second * 2}
- httpRes, err := httpClient.Get("https://api.pwnedpasswords.com/range/" + firstPart)
- if err != nil {
- return false, err
- }
- defer func() {
- err := httpRes.Body.Close()
- if err != nil {
- log.Printf("error while closing HTTP response body: %v\n", err)
- }
- }()
-
- scanObj := bufio.NewScanner(httpRes.Body)
- for scanObj.Scan() {
- scanLine := strings.SplitN(scanObj.Text(), ":", 2)
- if strings.ToLower(scanLine[0]) == secondPart {
- isPwned = true
- break
- }
- }
- if err := scanObj.Err(); err != nil {
- return isPwned, err
- }
-
- return isPwned, nil
-}