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
Click to show internal directories.
Click to hide internal directories.