package
Version:
v0.0.0-...-93fb3a7
Opens a new window with list of versions in this module.
Published: Jun 10, 2021
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func Sum(s []nextByte) int
Sum returns the sum of frequencies inside a transition array
type Chain struct {
Ngram int
Trans map[string]transition
}
Chain represents a Markov chain containing the ngram number and frequency map
NewChain returns a new Markov Chain model with number of given ngram.
Add count the number of pairs by inserting them into a frequency map
Pairs adds the transitions extracted from input string to an output channel
type Generator struct {
Ngram int
}
Generator is another representation of Markov chain to generate markov passwords
NewGenerator returns a Markov password generator from the given chain
Generate generates new passwords based on trained Markov model
and prints passwords in stdout
Pair represents a state transition between a set of one or more bytes and the
next byte in the string.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.