midy

package module
v0.0.0-...-d82be9a Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2018 License: MIT Imports: 2 Imported by: 0

README

midy

Simple hash string utility

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RegexSomethingHash = regexp.MustCompile(
	`[[:^xdigit:]]([[:xdigit:]]{32}|[[:xdigit:]]{40}|[[:xdigit:]]{64})[[:^xdigit:]]`,
)

RegexSomethingHash string

View Source
var RegexValidMd5 = regexp.MustCompile(
	`^([[:xdigit:]]{32})$`,
)

RegexValidMd5 for judge

View Source
var RegexValidSha1 = regexp.MustCompile(
	`^([[:xdigit:]]{40})$`,
)

RegexValidSha1 for judge

View Source
var RegexValidSha256 = regexp.MustCompile(
	`^([[:xdigit:]]{64})$`,
)

RegexValidSha256 for judge

Functions

func EmptyHash

func EmptyHash(s string) (yes bool)

EmptyHash check.

func ScrapeHashStrings

func ScrapeHashStrings(s string) (hashes []string)

ScrapeHashStrings from specified string

Types

type HashType

type HashType int

HashType to judge

const (

	// Invalid HashType
	Invalid HashType = iota

	// Md5 hash
	Md5

	// Sha1 hash
	Sha1

	// Sha256 hash
	Sha256
)

func DetectHashType

func DetectHashType(s string) (h HashType)

DetectHashType of string

Jump to

Keyboard shortcuts

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