Documentation ¶
Index ¶
- Constants
- func Generate(r io.Reader) (dbft.PrivateKey, dbft.PublicKey)
- func GenerateWith(t suiteType, r io.Reader) (dbft.PrivateKey, dbft.PublicKey)
- func NewECDSAPrivateKey(key *ecdsa.PrivateKey) dbft.PrivateKey
- func NewECDSAPublicKey(pub *ecdsa.PublicKey) dbft.PublicKey
- type ECDSAPriv
- type ECDSAPub
- type Uint160
- type Uint256
Constants ¶
View Source
const ( Uint256Size = 32 Uint160Size = 20 )
View Source
const ( // SuiteECDSA is a ECDSA suite over P-256 curve // with 64-byte uncompressed signatures. SuiteECDSA suiteType = 1 + iota )
Variables ¶
This section is empty.
Functions ¶
func GenerateWith ¶
GenerateWith generates new key pair for suite t using r as a source of entropy.
func NewECDSAPrivateKey ¶
func NewECDSAPrivateKey(key *ecdsa.PrivateKey) dbft.PrivateKey
NewECDSAPrivateKey returns new PublicKey from *ecdsa.PrivateKey.
Types ¶
type ECDSAPriv ¶
type ECDSAPriv struct {
*ecdsa.PrivateKey
}
ECDSAPriv is a wrapper over *ecdsa.PrivateKey.
type ECDSAPub ¶
ECDSAPub is a wrapper over *ecsda.PublicKey.
func (ECDSAPub) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler interface.
func (*ECDSAPub) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler interface.
type Uint160 ¶
type Uint160 [Uint160Size]byte
Click to show internal directories.
Click to hide internal directories.