credentials

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

Index

Constants

View Source
const (
	SaltLength = 12  // 12 Random Bytes are required to generate Salt
	Iterations = 101 // Default Iterations when using PBDFK2_SHA512
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Credentials

type Credentials struct {
	Username string
	Password string
}

Credentials Structure

func (Credentials) GeneratePBKDF2

func (cred Credentials) GeneratePBKDF2() (saltB64, digestB64 string)

Generate PBKDF2 SHA512 Encryption for Generated Salt

func (Credentials) GenerateSHA512

func (cred Credentials) GenerateSHA512() (saltB64, digestB64 string)

Generate the Bas64 Encoded SHA512 Digest for the Password + Salt Combination

Jump to

Keyboard shortcuts

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