hash

package
v3.11.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2019 License: Apache-2.0 Imports: 4 Imported by: 67

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.

func (Bcrypt) Config

func (b Bcrypt) Config() (internal.HashConfig, error)

Config returns the validated hash configuration.

type HMACMD5

type HMACMD5 struct {
	Key []byte
}

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.

func (HMACMD5) Config

func (h HMACMD5) Config() (internal.HashConfig, error)

Config returns the validated hash configuration.

type HMACSHA1

type HMACSHA1 struct {
	Key []byte
}

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.

func (HMACSHA1) Config

func (h HMACSHA1) Config() (internal.HashConfig, error)

Config returns the validated hash configuration.

type HMACSHA256

type HMACSHA256 struct {
	Key []byte
}

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
}

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 MD5

type MD5 struct {
	Rounds int
}

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.

func (MD5) Config

func (h MD5) Config() (internal.HashConfig, error)

Config returns the validated hash configuration.

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.

func (PBKDFSHA1) Config

func (h PBKDFSHA1) Config() (internal.HashConfig, error)

Config returns the validated hash configuration.

type SHA1

type SHA1 struct {
	Rounds int
}

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.

func (SHA1) Config

func (h SHA1) Config() (internal.HashConfig, error)

Config returns the validated hash configuration.

type SHA256

type SHA256 struct {
	Rounds int
}

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.

func (SHA256) Config

func (h SHA256) Config() (internal.HashConfig, error)

Config returns the validated hash configuration.

type SHA512

type SHA512 struct {
	Rounds int
}

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.

func (SHA512) Config

func (h SHA512) Config() (internal.HashConfig, error)

Config returns the validated hash configuration.

type Scrypt

type Scrypt struct {
	Key           []byte
	SaltSeparator []byte
	Rounds        int
	MemoryCost    int
}

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.

func (Scrypt) Config

func (s Scrypt) Config() (internal.HashConfig, error)

Config returns the validated hash configuration.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL