crypto

package
v0.0.0-...-2cefb57 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2015 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CURVE = elliptic.P256()
)

Functions

func B64Decode

func B64Decode(s string) ([]byte, error)

func B64Encode

func B64Encode(b []byte) string

func Verify

Types

type CertcoinPublicKey

type CertcoinPublicKey struct {
	X *big.Int `json:"x"`
	Y *big.Int `json:"y"`
}

type CertcoinSecretKey

type CertcoinSecretKey struct {
	PublicKey CertcoinPublicKey `json:"public_key"`
	D         *big.Int          `json:"d"`
}

func NewKey

func NewKey() CertcoinSecretKey

type CertcoinSignature

type CertcoinSignature struct {
	R *big.Int `json:"r"`
	S *big.Int `json:"s"`
}

type SHA256Sum

type SHA256Sum [32]byte

func Address

func Address(pk CertcoinPublicKey) SHA256Sum

func CertcoinHash

func CertcoinHash(b []byte) SHA256Sum

func CertcoinHashStr

func CertcoinHashStr(s string) SHA256Sum

func (SHA256Sum) B64Encode

func (s SHA256Sum) B64Encode() string

func (SHA256Sum) String

func (s SHA256Sum) String() string

Jump to

Keyboard shortcuts

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