license

package
v0.0.0-...-75e2e84 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2014 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UPPER_TIME_LIMIT = 0 // A load/save operation longer than this (in ns) will generate a log message
)

Variables

This section is empty.

Functions

func EncryptPassword

func EncryptPassword(passw, salt string) string

Update the password with a new one. The stored password is scrambled using md5, and so is never available as readable text.

func GenerateKey

func GenerateKey() string

func Make

func Make(password, salt string) (string, string)

Use a license key and a password

func VerifyPassword

func VerifyPassword(passwclear, passwordcrypted string, salt string) bool

Compare the given password with the stored one. The stored password is scrambled using md5, and so is never available as readable text.

Types

type License

type License struct {
	Email    string
	Password string // The password of the license
	License  string // The license key for this person
}

All this data is saved with the license (user DB). All names beginning with upper case will be saved.

Jump to

Keyboard shortcuts

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