util

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2016 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package util provides utility functions specific to the http-end-point component of Documize.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeHTMLString

func EncodeHTMLString(html string) (safe string)

EncodeHTMLString encodes HTML string

func EncodeTextTemplate

func EncodeTextTemplate(html string) (safe string, err error)

EncodeTextTemplate encodes input using text/template

func GeneratePassword

func GeneratePassword(password string, salt string) string

GeneratePassword returns a hashed password.

func GenerateRandomPassword

func GenerateRandomPassword() string

GenerateRandomPassword provides a string suitable for use as a password.

func GenerateSalt

func GenerateSalt() string

GenerateSalt provides a string suitable for use as a salt value.

func MatchPassword

func MatchPassword(hashedPassword string, password string, salt string) bool

MatchPassword copares a hashed password with a clear one.

func UniqueID

func UniqueID() string

UniqueID creates a randomly generated string suitable for use as part of an URI. It returns a string that is always 16 characters long.

Types

This section is empty.

Jump to

Keyboard shortcuts

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