key

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(privKey interface{}) (cccsp.Key, error)

New returns a cccsp Key instance

Types

type AESPrivateKey

type AESPrivateKey struct {
	PrivateKey []byte
}

AESPrivateKey contains a aes private key

func (*AESPrivateKey) Identifier

func (k *AESPrivateKey) Identifier() []byte

Identifier returns the identifier of this key

func (*AESPrivateKey) Private

func (k *AESPrivateKey) Private() bool

Private returns true if this key is a private key. false otherwise

func (*AESPrivateKey) Public

func (k *AESPrivateKey) Public() (cccsp.Key, error)

Public returns the corresponding public key part of an asymmetric public/private key pair.

func (*AESPrivateKey) Raw

func (k *AESPrivateKey) Raw() ([]byte, error)

Raw converts this key to its byte representation.

func (*AESPrivateKey) SKI added in v1.1.2

func (k *AESPrivateKey) SKI() []byte

SKI is for compatibility with Hyperledger Fabric bccsp

type ECDSAPrivateKey

type ECDSAPrivateKey struct {
	*ecdsa.PrivateKey
}

ECDSAPrivateKey contains a ecdsa private key

func (*ECDSAPrivateKey) Identifier

func (k *ECDSAPrivateKey) Identifier() []byte

Identifier returns the identifier of this key

func (*ECDSAPrivateKey) Private

func (k *ECDSAPrivateKey) Private() bool

Private returns true if this key is a private key. false otherwise

func (*ECDSAPrivateKey) Public

func (k *ECDSAPrivateKey) Public() (cccsp.Key, error)

Public returns the corresponding public key part of an asymmetric public/private key pair.

func (*ECDSAPrivateKey) Raw

func (k *ECDSAPrivateKey) Raw() ([]byte, error)

Raw converts this key to its byte representation.

func (*ECDSAPrivateKey) SKI added in v1.1.2

func (k *ECDSAPrivateKey) SKI() []byte

SKI is for compatibility with Hyperledger Fabric bccsp

type ECDSAPublicKey

type ECDSAPublicKey struct {
	*ecdsa.PublicKey
}

ECDSAPublicKey contains a ecdsa public key

func (*ECDSAPublicKey) Identifier

func (k *ECDSAPublicKey) Identifier() []byte

Identifier returns the identifier of this key

func (*ECDSAPublicKey) Private

func (k *ECDSAPublicKey) Private() bool

Private returns true if this key is a private key. false otherwise

func (*ECDSAPublicKey) Public

func (k *ECDSAPublicKey) Public() (cccsp.Key, error)

Public returns the corresponding public key part of an asymmetric public/private key pair.

func (*ECDSAPublicKey) Raw

func (k *ECDSAPublicKey) Raw() ([]byte, error)

Raw converts this key to its byte representation.

func (*ECDSAPublicKey) SKI added in v1.1.2

func (k *ECDSAPublicKey) SKI() []byte

SKI is for compatibility with Hyperledger Fabric bccsp

type RSAPrivateKey

type RSAPrivateKey struct {
	*rsa.PrivateKey
}

RSAPrivateKey contains a rsa private key

func (*RSAPrivateKey) Identifier

func (k *RSAPrivateKey) Identifier() []byte

Identifier returns the identifier of this key

func (*RSAPrivateKey) Private

func (k *RSAPrivateKey) Private() bool

Private returns true if this key is a private key. false otherwise

func (*RSAPrivateKey) Public

func (k *RSAPrivateKey) Public() (cccsp.Key, error)

Public returns the corresponding public key part of an asymmetric public/private key pair.

func (*RSAPrivateKey) Raw

func (k *RSAPrivateKey) Raw() ([]byte, error)

Raw converts this key to its byte representation.

func (*RSAPrivateKey) SKI added in v1.1.2

func (k *RSAPrivateKey) SKI() []byte

SKI is for compatibility with Hyperledger Fabric bccsp

type RSAPublicKey

type RSAPublicKey struct {
	*rsa.PublicKey
}

RSAPublicKey contains a rsa public key

func (*RSAPublicKey) Identifier

func (k *RSAPublicKey) Identifier() []byte

Identifier returns the identifier of this key

func (*RSAPublicKey) Private

func (k *RSAPublicKey) Private() bool

Private returns true if this key is a private key. false otherwise

func (*RSAPublicKey) Public

func (k *RSAPublicKey) Public() (cccsp.Key, error)

Public returns the corresponding public key part of an asymmetric public/private key pair.

func (*RSAPublicKey) Raw

func (k *RSAPublicKey) Raw() ([]byte, error)

Raw converts this key to its byte representation.

func (*RSAPublicKey) SKI added in v1.1.2

func (k *RSAPublicKey) SKI() []byte

SKI is for compatibility with Hyperledger Fabric bccsp

Jump to

Keyboard shortcuts

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