util

package
v0.0.0-...-26aa583 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func ByteSliceToBase64

func ByteSliceToBase64(byteSlice []byte) string

func CountBitsInByte

func CountBitsInByte(b byte) int

func DecryptAes128Ecb

func DecryptAes128Ecb(data, key []byte) []byte

func GetCryptopalsData

func GetCryptopalsData(url string) string

func HammingDistanceByte

func HammingDistanceByte(b1, b2 byte) int

func HammingDistanceBytes

func HammingDistanceBytes(b1, b2 []byte) int

func HexStringToByteSlice

func HexStringToByteSlice(hexString string) []byte

func NextByteOfRepeatingKey

func NextByteOfRepeatingKey(key []byte) func() byte

func RepeatingKeyXor

func RepeatingKeyXor(key, message string) []byte

func RepeatingKeyXorString

func RepeatingKeyXorString(key, message string) string

func ScoreString

func ScoreString(str string) int

func Transpose

func Transpose(bytes []byte, length int) [][]byte

func Xor

func Xor(a, b []byte) []byte

func XorHexStrings

func XorHexStrings(hexString1, hexString2 string) string

func XorOneByte

func XorOneByte(key byte, srcBytes []byte) []byte

Types

type CryptopalsResult

type CryptopalsResult struct {
	Key             []rune
	Score           int
	EncryptedString string
	DecryptedString string
}

func BruteXorOneByte

func BruteXorOneByte(hexBytes []byte) CryptopalsResult

func BruteXorOneByteString

func BruteXorOneByteString(hexString string) CryptopalsResult

type KeySizeHammingDistance

type KeySizeHammingDistance struct {
	KeySize         int
	HammingDistance float64
}

Jump to

Keyboard shortcuts

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