Skip to content

Jay-ponda-improwised/encryptionWithGo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

encryptionWithGo

Installation

  • Install latest version
go get -u github.com/Jay-ponda-improwised/encryptionWithGo
  • Install spacific version
go get -u github.com/Jay-ponda-improwised/[email protected]

Imports and package use

  • Import package and use alice localCrypto
import localCrypto "github.com/Jay-ponda-improwised/encryptionWithGo"

Core info about structure

Structure

  • A struct CipherText used to store (encrypted ext with key)
  1. Entry (It stores encrypted text)
  2. key (It stores key)

Encryption

  1. Encrypt(entry string) (CipherText, error)

    • params:
      • entry (string): Entry takes string which you want to encrypt.
    • returns:
      • CipherText, error: Which is struct with encrypted-string and key, error
  2. EncrypteIt(entry string, key int64) (string, error)

    • params:
      • entry (string), key (int64): Entry takes string which you want to encrypt, custom key
    • returns:
      • string, error: encrypted string, error

Decryption

  1. (d CipherText) Decrypt() (string, error)

    • returns:
      • string, error: plain text (decrypted text), error
  2. DecryptIt(encEntry string, key int64) (string, error)

    • params:
      • entry (string), key (int64): Entry takes string which you want to encrypt.
    • returns:
      • string, error: plain text (decrypted text), error

Errors

  • EmptyEntryFound: If given entry is empty ("")

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages