Documentation ¶
Overview ¶
Copyright (c) 2018 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php
Copyright (c) 2018 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php
Index ¶
- func ConstructPrivateKey(data []byte, curve elliptic.Curve) *ecdsa.PrivateKey
- func DecodePublicKey(data []byte, curve elliptic.Curve) (*ecdsa.PublicKey, error)
- func EncodePublicKey(key *ecdsa.PublicKey, compressed bool) []byte
- func GenerateECKeyPair(c elliptic.Curve, rand io.Reader, alg ECAlgorithm) (*PrivateKey, *PublicKey, error)
- type ECAlgorithm
- type PrivateKey
- type PublicKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConstructPrivateKey ¶
func ConstructPrivateKey(data []byte, curve elliptic.Curve) *ecdsa.PrivateKey
func DecodePublicKey ¶
func GenerateECKeyPair ¶
func GenerateECKeyPair(c elliptic.Curve, rand io.Reader, alg ECAlgorithm) (*PrivateKey, *PublicKey, error)
func (this *PrivateKey) Public() crypto.PublicKey { return &PublicKey{Algorithm: this.Algorithm, PublicKey: &this.PublicKey} }
Types ¶
type PrivateKey ¶
type PrivateKey struct { Algorithm ECAlgorithm *ecdsa.PrivateKey }
type PublicKey ¶
type PublicKey struct { Algorithm ECAlgorithm *ecdsa.PublicKey }
Click to show internal directories.
Click to hide internal directories.