encrypt

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: Apache-2.0 Imports: 8 Imported by: 3

Documentation

Overview

Package for working with encryption

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64DecString

func Base64DecString(value interface{}) (string, error)

Base64DecString It takes a string or []byte, converts it to a byte array, then decodes it from a base64 string - value: the string to decode - returns: the decoded string - returns: an error if there is one

func Base64EncString

func Base64EncString(value interface{}) (string, error)

Base64EncString It takes a string or []byte, converts it to a byte array, then encodes it to a base64 string and returns the base64 string - value: the string or []byte to encode - returns: the base64 encoded string

func DecryptString

func DecryptString(value interface{}, pass_word string) (string, error)

DecryptString takes a string or []byte, decodes it from base64, decrypts it, and returns the decrypted string - value: the string or []byte to decrypt - pass_word: the passphrase to use to decrypt the data - returns: the decrypted string - returns: an error if there is one

func EncryptString

func EncryptString(value interface{}, pass_word string) (string, error)

EncryptString takes a string or []byte, encrypts it, encodes it to base64, and returns the encrypted string - value: the string or []byte to encrypt - pass_word: the passphrase to use to encrypt the data - returns: the encrypted string - returns: an error if there is one

Types

This section is empty.

Jump to

Keyboard shortcuts

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