goutils

package module
v0.0.0-...-16d67cc Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2021 License: MIT Imports: 13 Imported by: 1

README

goutils

Build Status

Something that enriches the Go

Crypto
EncAesCbc(data, key []byte) ([]byte, error) 
DecAesCbc(data, key []byte) ([]byte, error) 
EncAes128Cbc(data, key []byte) ([]byte, error) 
EncAes192Cbc(data, key []byte) ([]byte, error) 
EncAes256Cbc(data, key []byte) ([]byte, error) 
DecAes128Cbc(data, key []byte) ([]byte, error) 
DecAes192Cbc(data, key []byte) ([]byte, error) 
DecAes256Cbc(data, key []byte) ([]byte, error)  

EncAesGcm(data, key, nonce []byte) ([]byte, error)
DecAesGcm(data, key, nonce []byte) ([]byte, error)
Compress
Gunzip(s []byte) ([]byte, error) 
Gzip(data []byte) ([]byte, error) 
Network
IntToIPv4(nn uint32) net.IP 
IPv4ToInt(ip net.IP) uint32 

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Aes128Key

func Aes128Key(key []byte) []byte

func Aes256Key

func Aes256Key(key []byte) []byte

func BytesToInt64

func BytesToInt64(buf []byte) int64

func GobDecode

func GobDecode(data []byte, to interface{}) error

func GobEncode

func GobEncode(p interface{}) ([]byte, error)

func Gunzip

func Gunzip(s []byte) ([]byte, error)

func Gzip

func Gzip(data []byte) ([]byte, error)

func IPv4ToInt

func IPv4ToInt(ip net.IP) uint32

IPv4ToInt converts IPv4 to int

func Int64ToBytes

func Int64ToBytes(i int64) []byte

func IntToIPv4

func IntToIPv4(nn uint32) net.IP

IntToIPv4 converts int to IPv4

func NewAesCBC

func NewAesCBC(key []byte) *aesCBC

func NewAesGCM

func NewAesGCM(key []byte) *aesGCM

Types

This section is empty.

Jump to

Keyboard shortcuts

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