MCPcopy Create free account

hub / github.com/klauspost/password / functions

Functions93 in github.com/klauspost/password

↓ 9 callersFunctionImport
Import will populate a database with common passwords. You must supply a Tokenizer (see tokenizer package for default tokenizers) that will deliver t
password.go:123
↓ 7 callersMethodClose
()
bulk.go:72
↓ 7 callersMethodSanitize
(string)
password.go:52
↓ 7 callersFunctionSanitizeOK
SanitizeOK can be used to check if a password passes the sanitizer. If the sanitizer is nil, DefaultSanitizer will be used.
password.go:240
↓ 5 callersFunctionCheck
Check a password against the database. It will return an error if: - Sanitazition fails. - DB lookup returns an error - Password is in database (ErrPa
password.go:206
↓ 5 callersMethodHas
(string)
password.go:45
↓ 4 callersMethodAdd
(string)
password.go:39
↓ 4 callersFunctioninDB
inDB will return information if a password is in the database
password_test.go:20
↓ 3 callersFunction_filePath
(dir, name string)
testdata/generated.go:207
↓ 3 callersFunctiontruncate
(s string)
drivers/sqlpw/sql.go:146
↓ 2 callersFunctionAsset
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
testdata/generated.go:69
↓ 2 callersMethodInit
()
password.go:113
↓ 2 callersMethodModTime
()
testdata/generated.go:39
↓ 2 callersMethodName
()
testdata/generated.go:30
↓ 2 callersFunctionNewMysql
NewMysql returns a new database wrapper, set up for MySQL. You must supply a schema (that should already exist), as well as the column the passwords
drivers/sqlpw/sql.go:60
↓ 2 callersFunctionNewPostgresql
NewPostgresql returns a new database wrapper, set up for PostgreSQL. You must supply a "schema.table" (that should already exist), as well as the col
drivers/sqlpw/sql.go:74
↓ 2 callersFunctiontruncate
Cut runes off the end until the string is below 512 bytes.
drivers/mgopw/mgo.go:57
↓ 1 callersMethodAdd
Add an entry to the password database
drivers/sqlpw/sql.go:85
↓ 1 callersMethodAdd
Has satisfies the password.DbWriter interface. It writes a single password to the database
drivers/bloompw/bloom.go:31
↓ 1 callersMethodAddMultiple
([]string)
bulk.go:8
↓ 1 callersFunctionAssetDir
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data c
testdata/generated.go:134
↓ 1 callersFunctionAssetInfo
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
testdata/generated.go:95
↓ 1 callersMethodMode
()
testdata/generated.go:36
↓ 1 callersFunctionNew
New will return a new Database interface that read/writes items to a single bucket.
drivers/boltpw/boltdb.go:17
↓ 1 callersFunctionNew
New will return a new Database interface that stores entries in a bloom filter
drivers/bloompw/bloom.go:18
↓ 1 callersFunctionNew
New returns a new database. Supply a valid (copy of a) session and the database and collection you would like to use. The correct keyspace must be set
drivers/cassandra/cassandra.go:26
↓ 1 callersFunctionNew
New returns a new database. Supply a valid (copy of a) session and the database and collection you would like to use.
drivers/mgopw/mgo.go:29
↓ 1 callersFunctionNewMemDB
NewMemDB creates a new MemDB instance
drivers/testdb/memdb.go:20
↓ 1 callersFunctionNewMemDBBulk
NewMemDBBulk will return a new MemDBBulk
drivers/testdb/memdb.go:47
↓ 1 callersMethodNext
()
password.go:62
↓ 1 callersFunctionRestoreAsset
RestoreAsset restores an asset under the given directory
testdata/generated.go:166
↓ 1 callersFunctionTestData
TestData will test that the data imported with TestImport is correctly returned. It will test "Has" function of the driver. If any error is returned t
drivers/testing.go:81
↓ 1 callersFunctionTestImport
TestImport will import about 1500 entries into your database. It will test "Add" and "AddMultiple" (if available). If any error is returned the test f
drivers/testing.go:47
↓ 1 callersFunctionbulkWrap
(out BulkWriter)
bulk.go:22
↓ 1 callersFunctiontempfile
tempfile returns a temporary file path.
drivers/boltpw/boltdb_test.go:15
↓ 1 callersFunctiontestdataTxtGzBytes
()
testdata/generated.go:51
MethodAdd
(s string)
bulk.go:55
MethodAdd
Has satisfies the password.DbWriter interface. It writes a single password to the database
drivers/boltpw/boltdb.go:49
MethodAdd
Add a password to the MemDB. It must silently ignore duplicates If an error is returned Import is aborted.
drivers/testdb/memdb.go:28
MethodAdd
Add a single entry
drivers/testdb/memdb.go:63
MethodAdd
Add an entry to the password database
drivers/cassandra/cassandra.go:35
MethodAdd
Add an entry to the password database
drivers/mgopw/mgo.go:39
MethodAddMultiple
AddMultiple satisfies the password.BulkWriter interface. It writes a number of passwords to the database
drivers/boltpw/boltdb.go:59
MethodAddMultiple
Add multiple entries to the password database
drivers/sqlpw/sql.go:98
MethodAddMultiple
AddMultiple is the function that will be called with several items at once.
drivers/testdb/memdb.go:54
MethodAddMultiple
AddMultiple satisfies the password.BulkWriter interface. It writes a number of passwords to the database
drivers/bloompw/bloom.go:38
FunctionAssetNames
AssetNames returns the names of the assets.
testdata/generated.go:108
MethodClose
Should be called when finished
tokenizer/linereader.go:69
FunctionExampleImport
()
password_test.go:301
FunctionExampleImport_xz
Open a xz compressed archive and import it. Uses the "xi2.org/x/xz" package to read xz files.
password_test.go:50
FunctionExampleNewMysql
Example of using a MySQL database. This assumes "test-table" has been created in "testdb". It could have been created like this: CREATE TABLE `test
drivers/sqlpw/mysql_test.go:54
FunctionExampleNewPostgresql
Example of using a Postgres database Uses 'pwtesttable' in the 'testschema' schema, and reads/adds to the "pass" column. Table can be created like t
drivers/sqlpw/postgres_test.go:90
FunctionExampleSanitizer
This example shows how to create a custom sanitizer that checks if the password matches the username or email. CustomSanitizer is defined as: type Cu
password_test.go:283
MethodHas
Has satisfies the password.DB interface
drivers/boltpw/boltdb.go:37
MethodHas
Has will return true if the database has the entry.
drivers/sqlpw/sql.go:130
MethodHas
Has will check if the database has a specific password. If any error is returned, it will be forwarded to your "Check()" call.
drivers/testdb/memdb.go:37
MethodHas
Has returns true if the map has the string
drivers/testdb/memdb.go:70
MethodHas
Has satisfies the password.DB interface
drivers/bloompw/bloom.go:25
MethodHas
Has will return true if the database has the entry.
drivers/cassandra/cassandra.go:40
MethodHas
Has will return true if the database has the entry.
drivers/mgopw/mgo.go:46
MethodInit
()
bulk.go:32
MethodIsDir
()
testdata/generated.go:42
FunctionMustAsset
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
testdata/generated.go:83
FunctionNew
New returns a new database. You must give an query, that returns the number of rows matching the parameter given. You must give an insert statement
drivers/sqlpw/sql.go:47
FunctionNewBz2Line
NewBz2Line reads one password per line until \0xa (newline) is encountered. The input is assumed to be bzip2 compressed. Input is streamed. If r does
tokenizer/linereader.go:51
FunctionNewGzLine
NewGzLine reads one password per line until \0xa (newline) is encountered. The input is assumed to be gzip compressed. Input is streamed.
tokenizer/linereader.go:35
FunctionNewLine
NewLine reads one password per line until \0xa (newline) is encountered. Input is streamed.
tokenizer/linereader.go:25
MethodNext
Next returns the data on the next line. Will return io.EOF when there is no more data.
tokenizer/linereader.go:60
FunctionRestoreAssets
RestoreAssets restores an asset under the given directory recursively
testdata/generated.go:191
FunctionSanitize
Sanitize will sanitize a password, useful before hashing and storing it. If the sanitizer is nil, DefaultSanitizer will be used.
password.go:229
MethodSanitize
doc at DefaultSanitizer
password.go:99
MethodSanitize
(s string)
password_test.go:247
MethodSize
()
testdata/generated.go:33
MethodSys
()
testdata/generated.go:45
FunctionTestBloom
Test a bloom database
drivers/bloompw/bloom_test.go:13
FunctionTestBolt
Test a bolt database
drivers/boltpw/boltdb_test.go:23
FunctionTestCassandra
Test a Cassandra database
drivers/cassandra/cassandra_test.go:13
FunctionTestDefaultSanitizer
(t *testing.T)
password_test.go:211
FunctionTestDriver
TestDriver will test a driver by running TestImport followed by TestData
drivers/testing.go:30
FunctionTestImport
(t *testing.T)
password_test.go:32
FunctionTestImportBig
(t *testing.T)
password_test.go:71
FunctionTestImportBulk
(t *testing.T)
password_test.go:100
FunctionTestImportBz2
(t *testing.T)
password_test.go:87
FunctionTestInDB
(t *testing.T)
password_test.go:121
FunctionTestInDBBulk
(t *testing.T)
password_test.go:166
FunctionTestMemDB
Test a MemDB database
drivers/testdb/memdb_test.go:12
FunctionTestMemDBBulk
Test a MemDBBulk database
drivers/testdb/memdb_test.go:20
FunctionTestMongo
Test a Mongo database
drivers/mgopw/mgo_test.go:14
FunctionTestMySQL
Test a MySQL database
drivers/sqlpw/mysql_test.go:14
FunctionTestPostgres
Test a Postgres database To run locally, use the "-pgpass" password to set the postgres user password.
drivers/sqlpw/postgres_test.go:22
Functioninit
()
password.go:79
Functioninit
()
drivers/sqlpw/postgres_test.go:16
FunctiontestdataTxtGz
()
testdata/generated.go:55