auth

package
v10.0.37 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptString

func DecryptString(base64CiphertextAndNonceAndSalt, password string, options ...WithOptionFunc) (string, error)

DecryptString will decrypt the encoded value with password

func EncryptString

func EncryptString(plaintext, password string, options ...WithOptionFunc) (string, error)

EncryptString will encrypt plaintext using password

Types

type WithOption added in v10.0.27

type WithOption struct {
	URLSafe bool
}

WithOption allows options to be customized

type WithOptionFunc added in v10.0.27

type WithOptionFunc func(opts *WithOption)

WithOptionFunc is a function for receiving options

func WithURLSafeOption added in v10.0.27

func WithURLSafeOption() WithOptionFunc

WithURLSafeOption will return a url safe encryption key

Jump to

Keyboard shortcuts

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