Generated from Manticore v1.1.5 • 201 packages. View on pkg.go.dev

dcc2

import "github.com/TheManticoreProject/Manticore/crypto/dcc2"

Index

func DCC2Hash

func DCC2Hash(username, password string, rounds int) string

DCC2Hash generates a DCC2 hash from the given username and password.

Parameters: - username: The username associated with the password. - password: The password to be hashed. - rounds: The number of PBKDF2 rounds to apply.

Returns: - A string in the format “$DCC2$<rounds>#<username>#<hash>” representing the DCC2 hash.

Example: DCC2Hash(“user”, “password”, 10240) returns the DCC2 hash of the password in the specified format.

func DCC2HashWithNTHash

func DCC2HashWithNTHash(username string, ntHash [16]byte, rounds int) string

DCC2Hash generates a DCC2 hash from the given username and password.

Parameters: - username: The username associated with the password. - password: The password to be hashed. - rounds: The number of PBKDF2 rounds to apply.

Returns: - A string in the format “$DCC2$<rounds>#<username>#<hash>” representing the DCC2 hash.

Example: DCC2Hash(“user”, “password”, 10240) returns the DCC2 hash of the password in the specified format.

func DCC2HashWithPassword

func DCC2HashWithPassword(username, password string, rounds int) string

DCC2HashWithPassword generates a DCC2 hash from the given username and password.

Parameters: - username: The username associated with the password. - password: The password to be hashed. - rounds: The number of PBKDF2 rounds to apply.

Returns: - A string in the format “$DCC2$<rounds>#<username>#<hash>” representing the DCC2 hash.

Example: DCC2Hash(“user”, “password”, 10240) returns the DCC2 hash of the password in the specified format.