Documentation ¶
Index ¶
- func CheckPasswordHash(hash, password string) error
- func DetectMarkdownCodeBlockLanguages(markdown string) (codeblocks []string)
- func Hash(tag string, data string) string
- func HashPassword(password string) (string, error)
- func RenderMarkdownToHTML(markdown string) template.HTML
- func UUID() string
- func ZipFiles(filename string, files []string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPasswordHash ¶
CheckPasswordHash securely compares a bcrypt hashed password with its possible plaintext equivalent. Returns nil on success, or an error on failure.
func DetectMarkdownCodeBlockLanguages ¶
DetectMarkdownCodeBlockLanguages detects and returns programming languages used in code blocks
func Hash ¶
Hash generates a hash of data using HMAC-SHA-512/256. The tag is intended to be a natural-language string describing the purpose of the hash, such as "hash file for lookup key" or "master secret to client secret". It serves as an HMAC "key" and ensures that different purposes will have different hash output. This function is NOT suitable for hashing passwords.
func HashPassword ¶
HashPassword generates a bcrypt hash of the password using work factor 10.
func RenderMarkdownToHTML ¶
Types ¶
This section is empty.