crypto

package
v2.11.0-beta1 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 7 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EncryptedPrivateKey

type EncryptedPrivateKey struct {
	keystore.CryptoJSON
}

func NewEncryptedPrivateKey

func NewEncryptedPrivateKey(data []byte, passphrase string, scryptParams utils.ScryptParams) (*EncryptedPrivateKey, error)

func (EncryptedPrivateKey) Decrypt

func (k EncryptedPrivateKey) Decrypt(passphrase string) (privkey []byte, err error)

Decrypt returns the PrivateKey decrypted via auth, or an error

func (*EncryptedPrivateKey) Scan

func (k *EncryptedPrivateKey) Scan(value interface{}) error

func (EncryptedPrivateKey) Value

func (k EncryptedPrivateKey) Value() (driver.Value, error)

type PublicKey

type PublicKey []byte

PublicKey defines a type which can be used for JSON and SQL.

func PublicKeyFromHex

func PublicKeyFromHex(hexStr string) (*PublicKey, error)

PublicKeyFromHex generates a public key from a hex string

func (PublicKey) MarshalJSON

func (k PublicKey) MarshalJSON() ([]byte, error)

func (*PublicKey) Scan

func (k *PublicKey) Scan(value interface{}) error

func (PublicKey) String

func (k PublicKey) String() string

func (*PublicKey) UnmarshalJSON

func (k *PublicKey) UnmarshalJSON(in []byte) error

func (PublicKey) Value

func (k PublicKey) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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