Documentation ΒΆ
Index ΒΆ
- Variables
- type CharacterSet
- type Cypher
- func (c *Cypher) Decrypt(grid [][]rune, password string) (string, error)
- func (c *Cypher) Encrypt(plaintext, password string, gridSize int) error
- func (c *Cypher) EncryptWithAutoGridSize(plaintext, password string) error
- func (c *Cypher) Grid() string
- func (c *Cypher) GridSize() int
- func (c *Cypher) RawGrid() [][]rune
- func (c *Cypher) SetCharacterSet(characterSet ...CharacterSet)
- type Interface
Constants ΒΆ
This section is empty.
Variables ΒΆ
View Source
var ( ErrorNotEnoughPositions = errors.New("not enough positions to embed data") ErrorDataTooLarge = errors.New("data too large to fit in the grid") ErrorInvalidLength = errors.New("invalid length") ErrorSerializedDataTooShort = errors.New("serialized data too short") ErrorInvalidRuneInEncoded = errors.New("invalid rune in encoded string") )
Character set for the grid
Functions ΒΆ
This section is empty.
Types ΒΆ
type CharacterSet ΒΆ
type CharacterSet string
const ( CharacterSetOgham CharacterSet = "Ogham" CharacterSetLinearB CharacterSet = "Linear B" CharacterSetEgyptian CharacterSet = "Egyptian Hieroglyphs" CharacterSetGlagolitic CharacterSet = "Glagolitic Script" CharacterSetCoptic CharacterSet = "Coptic Script" CharacterSetGothic CharacterSet = "Gothic Script" CharacterSetPhoenician CharacterSet = "Phoenician Script" CharacterSetUgaritic CharacterSet = "Ugaritic Script" CharacterSetViking CharacterSet = "Viking Runes" CharacterSetHiragana CharacterSet = "Hiragana" CharacterSetKatakana CharacterSet = "Katakana" CharacterSetMayan CharacterSet = "Mayan Numerals" )
type Cypher ΒΆ
type Cypher struct {
// contains filtered or unexported fields
}
func (*Cypher) Encrypt ΒΆ
Encrypt encrypts the plaintext message using the provided password and grid size
func (*Cypher) EncryptWithAutoGridSize ΒΆ
EncryptWithAutoGridSize encrypts the plaintext message using the provided password and automatically adjusts the grid size as needed.
func (*Cypher) SetCharacterSet ΒΆ
func (c *Cypher) SetCharacterSet(characterSet ...CharacterSet)
type Interface ΒΆ
type Interface interface { EncryptWithAutoGridSize(plaintext, password string) error Encrypt(plaintext, password string, gridSize int) ([][]rune, error) Decrypt(grid [][]rune, password string) (string, error) SetCharacterSet(characterSet ...CharacterSet) Grid() string GridSize() int RawGrid() [][]rune }
Click to show internal directories.
Click to hide internal directories.