Migrat pkg/password to using pkglib package
This commit is contained in:
parent
010fd536ea
commit
aa3580c248
11 changed files with 56 additions and 158 deletions
9
internal/passwordx/charset.go
Normal file
9
internal/passwordx/charset.go
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
package passwordx
|
||||
|
||||
import "github.com/tkw1536/pkglib/password"
|
||||
|
||||
// Charset is a Charset safe for usage within the distillery
|
||||
const Charset = password.DefaultCharSet
|
||||
|
||||
// Snapshot is a charset to be used to generate snapshot ids
|
||||
const Snapshot = password.DefaultCharSet
|
||||
23
internal/passwordx/common.go
Normal file
23
internal/passwordx/common.go
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
package passwordx
|
||||
|
||||
import (
|
||||
"embed"
|
||||
|
||||
"github.com/tkw1536/pkglib/password"
|
||||
)
|
||||
|
||||
//go:embed common
|
||||
var commonEmbed embed.FS
|
||||
|
||||
var Sources []password.PasswordSource
|
||||
|
||||
func init() {
|
||||
var err error
|
||||
Sources, err = password.NewSources(commonEmbed, "**/*.txt")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if len(Sources) == 0 {
|
||||
panic("no sources")
|
||||
}
|
||||
}
|
||||
10025
internal/passwordx/common/top10_000.txt
Normal file
10025
internal/passwordx/common/top10_000.txt
Normal file
File diff suppressed because it is too large
Load diff
2
internal/passwordx/common/wisski.txt
Normal file
2
internal/passwordx/common/wisski.txt
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
// This file contains a list of common WissKI Passwords
|
||||
W1ssk1.
|
||||
Loading…
Add table
Add a link
Reference in a new issue