set1

package
v0.0.0-...-7d67327 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BreakRepeatingKeyXOR

func BreakRepeatingKeyXOR(input []byte) []byte

BreakRepeatingKeyXOR deciphers a given input that has been XORed with a repeating key and returns the best result it finds

func BruteForceXORCypher

func BruteForceXORCypher(input []byte) ([]byte, int)

BruteForceXORCypher takes an hex encoded string that has been XORed against a single character and tries to decypher it

func DecryptAESinECB

func DecryptAESinECB(input, key []byte) []byte

DecryptAESinECB decyphers an input encrypted via AES-128 in ECB, according to the given key

func DetectAESinECB

func DetectAESinECB(input []byte, blockSize int) bool

DetectAESinECB will return true if it encounters a block of the given size more than once

func DetectRuneXOR

func DetectRuneXOR(filePath string) (string, error)

DetectRuneXOR reads every line from the given file path and XORs it against every possible character, returning the string with the highest score

func EstimateKeySize

func EstimateKeySize(input []byte) int

EstimateKeySize estimates the size of a repeating XOR key

func FixedXOR

func FixedXOR(a, b []byte) ([]byte, error)

FixedXOR takes 2 equal length buffers and produces their XOR combination

func HammingDistance

func HammingDistance(a, b []byte) int

HammingDistance calculates the edit distance given two byte arrays of the same length

func HexToBase64

func HexToBase64(hexString string) ([]byte, error)

HexToBase64 takes an hex encoded string and transforms it to a base64 encoded byte array

func RepeatingKeyXOR

func RepeatingKeyXOR(input, key []byte) []byte

RepeatingKeyXOR takes an input and XORs it with a repeating key

Types

This section is empty.

Jump to

Keyboard shortcuts

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