Versions in this module Expand all Collapse all v0 v0.1.1 Apr 12, 2024 v0.1.0 Apr 12, 2024 Changes in this version + func Hash(data []byte) []byte + func HashString(data string) []byte + type EllipticCurve struct + func NewEllipticCurve(curve elliptic.Curve) *EllipticCurve + func (ec *EllipticCurve) DecodePrivate(pemEncodedPriv string) (*ecdsa.PrivateKey, error) + func (ec *EllipticCurve) DecodePublic(pemEncodedPub string) (*ecdsa.PublicKey, error) + func (ec *EllipticCurve) EncodePrivate(privKey *ecdsa.PrivateKey) (string, error) + func (ec *EllipticCurve) EncodePublic(pubKey *ecdsa.PublicKey) (string, error) + func (ec *EllipticCurve) GenerateKeys() (*ecdsa.PrivateKey, *ecdsa.PublicKey, error) + func (ec *EllipticCurve) Sign(hash []byte) ([]byte, error) + func (ec *EllipticCurve) Verify(signature []byte, hash []byte) (bool, error) + type EncryptionHelper struct + Key []byte + func NewEncryptionHelper(key string) *EncryptionHelper + func (eh EncryptionHelper) Decrypt(encryptedData []byte) ([]byte, error) + func (eh EncryptionHelper) DecryptString(encryptedData string) ([]byte, error) + func (eh EncryptionHelper) Encrypt(data []byte) ([]byte, error) + func (eh EncryptionHelper) EncryptString(data string) ([]byte, error) + type IEncryptionHelper interface + Decrypt func(encryptedData []byte) ([]byte, error) + DecryptString func(encryptedData string) ([]byte, error) + Encrypt func(data []byte) ([]byte, error) + EncryptString func(data string) ([]byte, error)