utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package utils ...

*

Index

Constants

This section is empty.

Variables

View Source
var AppName = "go-encryptor"

AppName is the application name

Functions

func AESDecrypt

func AESDecrypt(key, data []byte) ([]byte, error)

AESDecrypt returns decrypted data and errors

func AESEncrypt

func AESEncrypt(key, data []byte) ([]byte, error)

AESEncrypt returns encrypted data and errors

func AESVerifyKey

func AESVerifyKey(key, data []byte) (bool, error)

AESVerifyKey verify the password

func ErrorLogger

func ErrorLogger(err error)

ErrorLogger logs error

func GetFileNameExt

func GetFileNameExt(file string) (filename, extension string)

GetFileNameExt simplify filename for use (Note: only 3 char ext)

func GetVersion

func GetVersion() string

GetVersion return code of the application

func PromptTermPass

func PromptTermPass(promptText string) ([]byte, error)

PromptTermPass takes password as user input

func ReadFile

func ReadFile(filename string) ([]byte, error)

ReadFile returns file data in bytes

func SaveFile

func SaveFile(filename string, data []byte) error

SaveFile save data to a file

Types

This section is empty.

Jump to

Keyboard shortcuts

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