Documentation ¶
Index ¶
- func IsMnemonicValid(mnemonic string) bool
- func Sha3Sum256(data string) string
- type BLS0ChainScheme
- func (b0 *BLS0ChainScheme) Add(signature, msg string) (string, error)
- func (b0 *BLS0ChainScheme) GenerateKeys(numKeys int) (*Wallet, error)
- func (b0 *BLS0ChainScheme) RecoverKeys(mnemonic string, numKeys int) (*Wallet, error)
- func (b0 *BLS0ChainScheme) SetPrivateKey(privateKey string) error
- func (b0 *BLS0ChainScheme) SetPublicKey(publicKey string) error
- func (b0 *BLS0ChainScheme) Sign(hash string) (string, error)
- func (b0 *BLS0ChainScheme) Verify(signature, msg string) (bool, error)
- type ED255190chainScheme
- func (ed *ED255190chainScheme) Add(signature, msg string) (string, error)
- func (ed *ED255190chainScheme) GenerateKeys(numKeys int) (*Wallet, error)
- func (ed *ED255190chainScheme) RecoverKeys(mnemonic string, numKeys int) (*Wallet, error)
- func (ed *ED255190chainScheme) SetPrivateKey(privateKey string) error
- func (ed *ED255190chainScheme) SetPublicKey(publicKey string) error
- func (ed *ED255190chainScheme) Sign(hash string) (string, error)
- func (ed *ED255190chainScheme) Verify(signature, msg string) (bool, error)
- type KeyPair
- type SignatureScheme
- type Wallet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsMnemonicValid ¶
func Sha3Sum256 ¶
Types ¶
type BLS0ChainScheme ¶
type BLS0ChainScheme struct {
// contains filtered or unexported fields
}
BLS0ChainScheme - a signature scheme for BLS0Chain Signature
func NewBLS0ChainScheme ¶
func NewBLS0ChainScheme() *BLS0ChainScheme
NewBLS0ChainScheme - create a BLS0ChainScheme object
func (*BLS0ChainScheme) GenerateKeys ¶
func (b0 *BLS0ChainScheme) GenerateKeys(numKeys int) (*Wallet, error)
GenerateKeys - implement interface
func (*BLS0ChainScheme) RecoverKeys ¶
func (b0 *BLS0ChainScheme) RecoverKeys(mnemonic string, numKeys int) (*Wallet, error)
func (*BLS0ChainScheme) SetPrivateKey ¶
func (b0 *BLS0ChainScheme) SetPrivateKey(privateKey string) error
SetPrivateKey - implement interface
func (*BLS0ChainScheme) SetPublicKey ¶
func (b0 *BLS0ChainScheme) SetPublicKey(publicKey string) error
SetPublicKey - implement interface
type ED255190chainScheme ¶
type ED255190chainScheme struct {
// contains filtered or unexported fields
}
ED255190chainScheme - a signature scheme based on ED25519
func NewED255190chainScheme ¶
func NewED255190chainScheme() *ED255190chainScheme
NewED25519Scheme - create a ED255219Scheme object
func (*ED255190chainScheme) Add ¶
func (ed *ED255190chainScheme) Add(signature, msg string) (string, error)
func (*ED255190chainScheme) GenerateKeys ¶
func (ed *ED255190chainScheme) GenerateKeys(numKeys int) (*Wallet, error)
GenerateKeys - implement interface
func (*ED255190chainScheme) RecoverKeys ¶
func (ed *ED255190chainScheme) RecoverKeys(mnemonic string, numKeys int) (*Wallet, error)
func (*ED255190chainScheme) SetPrivateKey ¶
func (ed *ED255190chainScheme) SetPrivateKey(privateKey string) error
func (*ED255190chainScheme) SetPublicKey ¶
func (ed *ED255190chainScheme) SetPublicKey(publicKey string) error
type SignatureScheme ¶
type SignatureScheme interface { // Generate fresh keys GenerateKeys(numKeys int) (*Wallet, error) // Generate keys from mnemonic for recovery RecoverKeys(mnemonic string, numKeys int) (*Wallet, error) // Signing - Set private key to sign SetPrivateKey(privateKey string) error Sign(hash string) (string, error) // Signature verification - Set public key to verify SetPublicKey(publicKey string) error Verify(signature string, msg string) (bool, error) // Combine signature for schemes BLS Add(signature, msg string) (string, error) }
SignatureScheme - an encryption scheme for signing and verifying messages
func NewSignatureScheme ¶
func NewSignatureScheme(sigScheme string) SignatureScheme
NewSignatureScheme creates an instance for using signature functions
Click to show internal directories.
Click to hide internal directories.