Documentation
¶
Index ¶
- Constants
- Variables
- func Verify(publicKey []byte, message []byte, signature []byte) bool
- type Key
- type SignerEd25519
- func (s *SignerEd25519) PrivateKeyBytes() []byte
- func (s *SignerEd25519) PrivateKeyHex() string
- func (s *SignerEd25519) PublicBase64Key() string
- func (s *SignerEd25519) PublicKeyBytes() []byte
- func (s *SignerEd25519) PublicKeyHex() string
- func (s *SignerEd25519) SecretKeyBytes() []byte
- func (s *SignerEd25519) SecretKeyHex() string
- func (s *SignerEd25519) Sign(message []byte) []byte
- func (s SignerEd25519) String() string
Constants ¶
View Source
const (
FirstHardenedIndex = uint32(0x80000000)
)
Variables ¶
View Source
var ( ErrInvalidPath = errors.New("invalid derivation path") ErrNoPublicDerivation = errors.New("no public derivation for ed25519") )
Functions ¶
Types ¶
type Key ¶
func NewMasterKey ¶
type SignerEd25519 ¶
type SignerEd25519 struct { PrivateKey ed25519.PrivateKey PublicKey ed25519.PublicKey }
func NewSigner ¶
func NewSigner() (*SignerEd25519, error)
func NewSignerByHex ¶
func NewSignerByHex(privatekey string) (signerEd25519 *SignerEd25519, err error)
func NewSignerBySeed ¶
func NewSignerBySeed(seed []byte) (signerEd25519 *SignerEd25519, err error)
func (*SignerEd25519) PrivateKeyBytes ¶
func (s *SignerEd25519) PrivateKeyBytes() []byte
func (*SignerEd25519) PrivateKeyHex ¶
func (s *SignerEd25519) PrivateKeyHex() string
func (*SignerEd25519) PublicBase64Key ¶
func (s *SignerEd25519) PublicBase64Key() string
func (*SignerEd25519) PublicKeyBytes ¶
func (s *SignerEd25519) PublicKeyBytes() []byte
func (*SignerEd25519) PublicKeyHex ¶
func (s *SignerEd25519) PublicKeyHex() string
func (*SignerEd25519) SecretKeyBytes ¶
func (s *SignerEd25519) SecretKeyBytes() []byte
func (*SignerEd25519) SecretKeyHex ¶
func (s *SignerEd25519) SecretKeyHex() string
func (*SignerEd25519) Sign ¶
func (s *SignerEd25519) Sign(message []byte) []byte
func (SignerEd25519) String ¶
func (s SignerEd25519) String() string
Click to show internal directories.
Click to hide internal directories.