Documentation ¶
Overview ¶
Package hash contains a collection of password hash algorithms that can be used with the auth.ImportUsers() API. Refer to https://firebase.google.com/docs/auth/admin/import-users for more details about supported hash algorithms.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bcrypt ¶
type Bcrypt struct{}
Bcrypt represents the BCRYPT hash algorithm.
Refer to https://firebase.google.com/docs/auth/admin/import-users#import_users_with_bcrypt_hashed_passwords for more details.
type HMACMD5 ¶
type HMACMD5 struct { Key []byte InputOrder InputOrderType }
HMACMD5 represents the HMAC SHA512 hash algorithm.
Refer to https://firebase.google.com/docs/auth/admin/import-users#import_users_with_hmac_hashed_passwords for more details. Key is required.
type HMACSHA1 ¶
type HMACSHA1 struct { Key []byte InputOrder InputOrderType }
HMACSHA1 represents the HMAC SHA512 hash algorithm.
Key is required. Refer to https://firebase.google.com/docs/auth/admin/import-users#import_users_with_hmac_hashed_passwords for more details.
type HMACSHA256 ¶
type HMACSHA256 struct { Key []byte InputOrder InputOrderType }
HMACSHA256 represents the HMAC SHA512 hash algorithm.
Key is required. Refer to https://firebase.google.com/docs/auth/admin/import-users#import_users_with_hmac_hashed_passwords for more details.
func (HMACSHA256) Config ¶
func (h HMACSHA256) Config() (internal.HashConfig, error)
Config returns the validated hash configuration.
type HMACSHA512 ¶
type HMACSHA512 struct { Key []byte InputOrder InputOrderType }
HMACSHA512 represents the HMAC SHA512 hash algorithm.
Key is required. Refer to https://firebase.google.com/docs/auth/admin/import-users#import_users_with_hmac_hashed_passwords for more details.
func (HMACSHA512) Config ¶
func (h HMACSHA512) Config() (internal.HashConfig, error)
Config returns the validated hash configuration.
type InputOrderType ¶
type InputOrderType int
InputOrderType specifies the order in which users' passwords/salts are hashed
const ( InputOrderUnspecified InputOrderType = iota InputOrderSaltFirst InputOrderPasswordFirst )
Available InputOrderType values
type MD5 ¶
type MD5 struct { Rounds int InputOrder InputOrderType }
MD5 represents the MD5 hash algorithm.
Rounds must be between 0 and 8192. Refer to https://firebase.google.com/docs/auth/admin/import-users#import_users_with_md5_sha_and_pbkdf_hashed_passwords for more details.
type PBKDF2SHA256 ¶
type PBKDF2SHA256 struct {
Rounds int
}
PBKDF2SHA256 represents the PBKDF2SHA256 hash algorithm.
Rounds must be between 0 and 120000. Refer to https://firebase.google.com/docs/auth/admin/import-users#import_users_with_md5_sha_and_pbkdf_hashed_passwords for more details.
func (PBKDF2SHA256) Config ¶
func (h PBKDF2SHA256) Config() (internal.HashConfig, error)
Config returns the validated hash configuration.
type PBKDFSHA1 ¶
type PBKDFSHA1 struct {
Rounds int
}
PBKDFSHA1 represents the PBKDFSHA1 hash algorithm.
Rounds must be between 0 and 120000. Refer to https://firebase.google.com/docs/auth/admin/import-users#import_users_with_md5_sha_and_pbkdf_hashed_passwords for more details.
type SHA1 ¶
type SHA1 struct { Rounds int InputOrder InputOrderType }
SHA1 represents the SHA1 hash algorithm.
Rounds must be between 1 and 8192. Refer to https://firebase.google.com/docs/auth/admin/import-users#import_users_with_md5_sha_and_pbkdf_hashed_passwords for more details.
type SHA256 ¶
type SHA256 struct { Rounds int InputOrder InputOrderType }
SHA256 represents the SHA256 hash algorithm.
Rounds must be between 1 and 8192. Refer to https://firebase.google.com/docs/auth/admin/import-users#import_users_with_md5_sha_and_pbkdf_hashed_passwords for more details.
type SHA512 ¶
type SHA512 struct { Rounds int InputOrder InputOrderType }
SHA512 represents the SHA512 hash algorithm.
Rounds must be between 1 and 8192. Refer to https://firebase.google.com/docs/auth/admin/import-users#import_users_with_md5_sha_and_pbkdf_hashed_passwords for more details.
type Scrypt ¶
Scrypt represents the scrypt hash algorithm.
This is the modified scrypt used by Firebase Auth (https://github.com/firebase/scrypt). Rounds must be between 1 and 8, and the MemoryCost must be between 1 and 14. Key is required. Refer to https://firebase.google.com/docs/auth/admin/import-users#import_users_with_firebase_scrypt_hashed_passwords for more details.
type StandardScrypt ¶
type StandardScrypt struct { BlockSize int DerivedKeyLength int MemoryCost int Parallelization int }
StandardScrypt represents the standard scrypt hash algorithm.
Refer to https://firebase.google.com/docs/auth/admin/import-users#import_users_with_standard_scrypt_hashed_passwords for more details.
func (StandardScrypt) Config ¶
func (s StandardScrypt) Config() (internal.HashConfig, error)
Config returns the validated hash configuration.