utils

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2016 License: MIT Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(text []byte, password []byte) (decryptedText []byte, err error)

decrypt uses PGP to decrypt symmetrically encrypted and armored text with the provided password.

func Encrypt

func Encrypt(text []byte, password []byte) (encryptedText []byte, err error)

encrypt uses PGP to symmetrically encrypt and armor text with the provided password.

func FormatUnixTime

func FormatUnixTime(ts int64) string

func GeneratePassword

func GeneratePassword(length int) (string, error)

GeneratePassword generates a password.

func GetAnswer

func GetAnswer(prompt string, defaultYes bool) bool

func GetInput

func GetInput(prompt string) (string, error)

func GetPasswordInput

func GetPasswordInput(prompt string) ([]byte, error)

func PrettyPrint

func PrettyPrint(v interface{})

Types

This section is empty.

Jump to

Keyboard shortcuts

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