Categorygithub.com/Kesha005/go_encryptor
modulepackage
0.0.0-20240516095404-18aa727877c9
Repository: https://github.com/kesha005/go_encryptor.git
Documentation: pkg.go.dev

# README

Go encryptor

Golang data encryptor package by Saparov

Installing

Install from repository

go get github.com/Kesha005/go_encryptor

Where to use

Encryption and decryption are used to secure data in auth,message systems and in cybersecurity

Usage

Firstly we need config our .env file and add there "SECRET_KEY" and "IV_16_KEY"

.ENV file

    
    SECRET_KEY="thismustbe16or24digitkey."
    IV_16_KEY="thisis16digitkey"
    

Example:

Import package

    import (
	"github.com/Kesha005/go_encryptor"
	"fmt"
	"github.com/joho/godotenv"

)

Encryption and decryption

    
    StringToEncrypt := "Encrypting this string"
	godotenv.Load(".env")
	fmt.Println(StringToEncrypt)
	encText, err := go_encryptor.Encrypt(StringToEncrypt)
	if err != nil {
		fmt.Println("error encrypting your classified text: ", err)
	}
	fmt.Println(encText)
	// To decrypt the original StringToEncrypt
	decText, err := go_encryptor.Decrypt(encText)
	if err != nil {
		fmt.Println("error decrypting your encrypted text: ", err)
	}
	fmt.Println(decText)
    

# Packages

No description provided by the author
No description provided by the author

# Functions

Decrypt method is to extract back the encrypted text.
Encrypt method is to encrypt or hide any classified text.