Documentation ¶
Index ¶
- func AESDecrypt(ciphertext, iv, key []byte) ([]byte, error)
- func AESEncrypt(plaintext, iv, key []byte) ([]byte, error)
- func AESGenerateIV() ([]byte, error)
- func Base32Decode(data string) (string, error)
- func Base32Encode(data string) string
- func Base64Decode(data string) (string, error)
- func Base64Encode(data string) string
- func BcryptHash(plaintext []byte) ([]byte, error)
- func BcryptVerifyHash(hash, plaintext []byte) bool
- func ChaCha20Decrypt(data, key []byte) ([]byte, error)
- func ChaCha20Encrypt(data, key []byte) ([]byte, error)
- func EllipticCurveDecrypt(data, key []byte) ([]byte, error)
- func EllipticCurveEncrypt(data, key []byte) ([]byte, error)
- func MD5Hash(data []byte) string
- func PKCS5Pad(content []byte, blockSize int) []byte
- func PKCS5Trim(content []byte) []byte
- func RC4Decrypt(data, key []byte) ([]byte, error)
- func RC4Encrypt(data, key []byte) ([]byte, error)
- func ROT13(data string) string
- func ROT47(data string) string
- func SHA1(data []byte) string
- func SHA256(data []byte) string
- func SHA512(data []byte) string
- func TripleDESDecrypt(data, key []byte) ([]byte, error)
- func TripleDESEncrypt(data, key []byte) ([]byte, error)
- func VerifyMD5Hash(hash, password string) bool
- func VerifySHA1(data []byte, hash string) bool
- func VerifySHA256(data []byte, hash string) bool
- func VerifySHA512(data []byte, hash string) bool
- func XOR(buf, xor []byte) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AESDecrypt ¶
AESDecrypt decrypts the given ciphertext using the given key and returns the plaintext.
func AESEncrypt ¶
AESEncrypt encrypts the given plaintext using the given key and returns the ciphertext.
func AESGenerateIV ¶
AESGenerateIV generates a random initialization vector (IV) of the given length.
func Base32Decode ¶
Base32Decode decodes the given base32 encoded data.
func Base32Encode ¶
Base32Encode encodes the given data using base32 encoding.
func Base64Decode ¶
Base64Decode decodes the given data using base64 encoding.
func Base64Encode ¶
Base64Encode encodes the given data using base64 encoding.
func BcryptHash ¶
Hash hashes the given data and returns a byte slice containing the hash.
func BcryptVerifyHash ¶
BcryptVerifyHash verifies that the given hash matches the given data.
func ChaCha20Decrypt ¶
ChaCha20Decrypt decrypts the given ciphertext using the given key and returns the plaintext.
func ChaCha20Encrypt ¶
ChaCha20Encrypt encrypts the given plaintext using the given key and returns the ciphertext.
func EllipticCurveDecrypt ¶
EllipticCurveDecrypt decrypts the given ciphertext using the given key and returns the plaintext.
func EllipticCurveEncrypt ¶
EllipticCurveEncrypt encrypts the given data using the given key and returns the ciphertext.
func RC4Decrypt ¶
RC4Decrypt decrypts the given ciphertext using the given key and returns the plaintext.
func RC4Encrypt ¶
RC4Encypt encrypts the given data using the given key and returns the ciphertext.
func SHA1 ¶
SHA1 is a cryptographic hash function that produces a 160-bit hash value known as a message digest.
func SHA256 ¶
SHA256 is a cryptographic hash function that produces a 256-bit hash value known as a message digest.
func SHA512 ¶
SHA512 is a cryptographic hash function that produces a 512-bit hash value known as a message digest.
func TripleDESDecrypt ¶
TripleDESDecrypt decrypts the given data using Triple DES
func TripleDESEncrypt ¶
TripleDESEncrypt encrypts the given data using Triple DES
func VerifyMD5Hash ¶
VerifyMD5Hash verifies that the given data matches the given MD5 hash.
func VerifySHA1 ¶
VerifySHA1 verifies the SHA1 hash of the given data and returns true if the hash is valid, and false otherwise.
func VerifySHA256 ¶
VerifySHA256 verifies the SHA256 hash of the given data and returns true if the hash is valid, and false otherwise.
func VerifySHA512 ¶
VerifySHA512 verifies the SHA512 hash of the given data and returns true if the hash is valid, and false otherwise.
Types ¶
This section is empty.