Documentation ¶
Index ¶
- Constants
- func Register()
- func SetDefault()
- type PwdPlaintext
- func (t *PwdPlaintext) ComparePasswords(hashedPassword, password, salt string) bool
- func (t *PwdPlaintext) EncryptPassword(clearPassword, userSalt string) string
- func (t *PwdPlaintext) Id() string
- func (t *PwdPlaintext) LongHelp() string
- func (t *PwdPlaintext) Setup(json string) encryption.EncryptDriver
- func (t *PwdPlaintext) ShortHelp() string
Constants ¶
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 ¶
func (t *PwdPlaintext) Setup(json string) encryption.EncryptDriver
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.