plaintext

package
v0.0.0-...-51d629d Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2016 License: BSD-3-Clause, BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const DriverName = "plaintext"

DriverName Specifies the specific identity of this driver within a group

Variables

This section is empty.

Functions

func Register

func Register()

Register is a simple wrapper to make sure registration occurs properly

func SetDefault

func SetDefault()

SetDefault will set THIS driver as the default encryption driver.

Types

type PwdPlaintext

type PwdPlaintext struct {
	Salt string
}

PwdPlaintext defines the variables required and initialised

func New

func New() *PwdPlaintext

New will return an address pointing to a new PwdPlaintext structure

func (*PwdPlaintext) ComparePasswords

func (t *PwdPlaintext) ComparePasswords(hashedPassword, password, salt string) bool

ComparePasswords must check to see if the passed password is equal to the stored password

func (*PwdPlaintext) EncryptPassword

func (t *PwdPlaintext) EncryptPassword(clearPassword, userSalt string) string

EncryptPassword will encrypt the password using the magic number within the record. This should be sufficient to protect it but still allow us to re-create later on. (The magic number will never alter for the life of the record

func (*PwdPlaintext) Id

func (t *PwdPlaintext) Id() string

Id returns the string identifier for this driver

func (*PwdPlaintext) LongHelp

func (t *PwdPlaintext) LongHelp() string

LongHelp returns a longer descriptive text for the help

func (*PwdPlaintext) Setup

Setup should be called only when the driver has been selected for use.

func (*PwdPlaintext) ShortHelp

func (t *PwdPlaintext) ShortHelp() string

ShortHelp returns a short string identifier for the identity.

Jump to

Keyboard shortcuts

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