cypherDecipher

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2022 License: MIT Imports: 2 Imported by: 1

README

cypherDecipher

Package cypherDecipher contains functions for adding and removing salt from the text.

The main objective of this package is to learn

  • How to build conflict free packages
  • How to publish packages
  • How to use git tag and use them to have a versioned release of your package.

Usage

Download dependecies

go get -u github.com/JammUtkarsh/cypherDecipher

Importing in functions

package main 

import "github.com/JammUtkarsh/cypherDecipher"

func main() {
password := "somerandompassword"
pCount := len(password)
 saltedPassword, spCount := cypherDecipher.CypherPassword(password)
 println(saltedPassword)
println(cypherDecipher.DecypherPassword(saltedPassword, pCount, spCount))
}

Documentation

Overview

Package cypherDecipher contains functions for adding and removing salt from the text.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CypherPassword

func CypherPassword(password string) (saltedPassword string, pCount int, spCount int)

CypherPassword adds salt to the password. It takes in a normal string and returns a salted string and the length of the salt.

func DecipherPassword

func DecipherPassword(saltedPassword string, pCount, spCount int) string

DecipherPassword removes the salt from the password. It takes in a salted string, the length of the original password and length of the salt and returns the original password.

Types

This section is empty.

Jump to

Keyboard shortcuts

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