cryptography

package
v0.0.0-...-0444a63 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const HashLength = 32

Variables

This section is empty.

Functions

func DecryptData

func DecryptData(ciphertext []byte, password string) ([]byte, error)

DecryptData decrypts the input ciphertext using AES decryption with the provided password.

func EncryptData

func EncryptData(data []byte, password string) ([]byte, error)

EncryptData encrypts the input data using AES encryption with the provided password.

func HashString

func HashString(uniqueData string) string

HashString calculates the SHA-256 hash of the input string and returns it as a hexadecimal string.

Types

type Hash

type Hash [HashLength]byte
var ZEROHASH Hash

Jump to

Keyboard shortcuts

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