algorithm

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

description: keybox

@author: xwc1125 @date: 2020/8/18 0018

description: keybox

@author: xwc1125 @date: 2020/8/18 0018

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlgorithmAPI

type AlgorithmAPI interface {
	GetPubKeyFromPriKey(priKey []byte) ([]byte, error)   // 通过私钥获取公钥
	Sign(priKey []byte, hash []byte) (*Signature, error) // 使用私钥对交易体Hash进行签名
}

type Signature

type Signature struct {
	SignBytes []byte `json:"signBytes"` // 签名数据(R,S)
	V         byte   `json:"v"`         // 校验码
	Pubkey    []byte `json:"pubkey"`    // 公钥
}

func (*Signature) Bytes

func (s *Signature) Bytes() []byte

func (*Signature) SignWithPubkey

func (s *Signature) SignWithPubkey() []byte

func (*Signature) VLeft

func (s *Signature) VLeft() []byte

func (*Signature) VNone

func (s *Signature) VNone() []byte

func (*Signature) VRight

func (s *Signature) VRight() []byte

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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