sbh

package
v0.0.0-...-4230696 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LETTERS = "abcdefghijklmnopqrstuvwxyz"
	DIGITS  = "0123456789"
	SYMBOLS = "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"
)

LETTERS, DIGITS, and SYMBOLS are the string representations of all possible letters, digits, and symbols (minus some symbols).

Variables

This section is empty.

Functions

func Generate

func Generate(secbaehash SBH) string

Generate a hash using a caesarCipher with the specified hashing Algorithm. A pseudo-random rot is generated based on given Seed for number of rotations (NRots) specified. If Uppercase is set to true, capitalize the first rune that IsLetter for UppercaseTimes. If Symbols are given, append them to the hash.

Types

type SBH

type SBH struct {
	Plaintext      string
	NRots          int64
	Seed           int64
	Algorithm      string
	Uppercase      bool
	UppercaseTimes int
	Symbols        string
}

SBH is a struct containing all the required parts to create a SBH

Jump to

Keyboard shortcuts

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