crypto

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesDecrypt

func AesDecrypt(ciphertext []byte, key []byte) ([]byte, error)

AesDecrypt - AES Decrypt

func AesDecrypt64

func AesDecrypt64(encodedCiphertext string, key []byte) ([]byte, error)

AesDecrypt64 - AES Decrypt base64

func AesEncrypt

func AesEncrypt(plaintext []byte, key []byte) ([]byte, error)

AesEncrypt - AES Encrypt

func AesEncrypt64

func AesEncrypt64(plaintext []byte, key []byte) (string, error)

AesEncrypt64 - AES Encrypt base64

func ComparePassword

func ComparePassword(hashedPassword, password string) bool

ComparePassword compares the hashed password with the provided password.

func HashPassword

func HashPassword(ctx context.Context, password string) (string, error)

HashPassword hashes the provided password using bcrypt.

func PKCS7Padding

func PKCS7Padding(ciphertext []byte, blockSize int) []byte

PKCS7Padding - PKCS7 padding

func PKCS7UnPadding

func PKCS7UnPadding(origData []byte) []byte

PKCS7UnPadding - PKCS7 unpadding

Types

This section is empty.

Jump to

Keyboard shortcuts

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