crypto

package
v1.65.3 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: BSD-3-Clause Imports: 6 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAddress2 added in v1.65.3

func CreateAddress2(b common.Address, salt [32]byte, inithash []byte) common.Address

CreateAddress2 creates an ethereum address given the address bytes, initial contract code hash and a salt.

func Ecrecover

func Ecrecover(hash, sig []byte) ([]byte, error)

Ecrecover 根据压缩消息和签名,返回压缩的公钥信息

func Keccak256

func Keccak256(data ...[]byte) []byte

Keccak256 计算并返回 Keccak256 哈希

func Keccak256Hash

func Keccak256Hash(data ...[]byte) (h common.Hash)

Keccak256Hash calculates and returns the Keccak256 hash of the input data, converting it to an internal Hash data structure.

func SigToPub

func SigToPub(hash, sig []byte) (*ecdsa.PublicKey, error)

SigToPub 根据签名返回公钥信息

func ValidateSignatureValues

func ValidateSignatureValues(r, s *big.Int) bool

ValidateSignatureValues 校验签名信息是否正确

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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