utils

package
v0.0.0-...-dd81e22 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2015 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeHex

func DecodeHex(a string) ([]byte, error)

func HammingDistance

func HammingDistance(a, b []byte) int

func ReadLines

func ReadLines(path string) ([]string, error)

func Score

func Score(in []byte) int

func Xor

func Xor(left, right string) string

func XorEncrypt

func XorEncrypt(message, key []byte) []byte

Types

type KeyEncoding

type KeyEncoding struct {
	Key      string
	Encoding string
	Score    int
}

func FindCipher

func FindCipher(enc []byte, atLeast int) []KeyEncoding

type KeyEncodings

type KeyEncodings []KeyEncoding

func (KeyEncodings) Len

func (a KeyEncodings) Len() int

func (KeyEncodings) Less

func (a KeyEncodings) Less(i, j int) bool

func (KeyEncodings) Swap

func (a KeyEncodings) Swap(i, j int)

Jump to

Keyboard shortcuts

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