Basic tools for any app
- BytesToHexSep: Format a byte slice in rows of
bytesPerSection
values, formatted in hexadecimal format - BytesToString: Format a byte slice as a utf8 string, useful for constants in go
- BytesToStringSep: Format a byte slice in rows of
bytesPerSection
UTF8 strings
- hex: Convert byte slices to/from hex strings. Includes a tag:tiny version that doesn't use a 256 byte lookup table for use on embedded devices (~50% slower than regular). Similar to go's built-in hex encoded, except errors include location and value of invalid hex-values on decode.
- Detect platform endianness
- RipeMD (128,160,256,320): For secure hashing RipeMD 128/256 are no longer recommended Preimage Attacks on Step-Reduced RIPEMD-128 and RIPEMD-160
- Streebog (256,512): Subject to a rebound attack and second-preimage attack
- Whirlpool: Subject to a rebound attack
- CIDR, IPv4, Mask types
- IpTree: Add CIDR and IP addresses to a collection and get back the shortest description of the composition (repeat/overlapping CIDR will merge, sequential CIDR will join into larger sets). Useful for eg firewall rules
go test ./...