Documentation ¶
Index ¶
- func RandTestBogusIdentity() (tnet.Identity, error)
- func RandTestBogusIdentityOrFatal(t *testing.T) tnet.Identity
- type TestBogusPrivateKey
- func (sk TestBogusPrivateKey) Bytes() ([]byte, error)
- func (sk TestBogusPrivateKey) Decrypt(b []byte) ([]byte, error)
- func (sk TestBogusPrivateKey) Equals(k ic.Key) bool
- func (sk TestBogusPrivateKey) GenSecret() []byte
- func (sk TestBogusPrivateKey) GetPublic() ic.PubKey
- func (sk TestBogusPrivateKey) Raw() ([]byte, error)
- func (sk TestBogusPrivateKey) Sign(message []byte) ([]byte, error)
- func (pk TestBogusPrivateKey) Type() pb.KeyType
- type TestBogusPublicKey
- func (pk TestBogusPublicKey) Bytes() ([]byte, error)
- func (pk TestBogusPublicKey) Encrypt(b []byte) ([]byte, error)
- func (pk TestBogusPublicKey) Equals(k ic.Key) bool
- func (pk TestBogusPublicKey) Raw() ([]byte, error)
- func (pk TestBogusPublicKey) RawFull() ([]byte, error)
- func (pk TestBogusPublicKey) Type() pb.KeyType
- func (pk TestBogusPublicKey) Verify(data, sig []byte) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RandTestBogusIdentity ¶
Types ¶
type TestBogusPrivateKey ¶
type TestBogusPrivateKey []byte
TestBogusPrivateKey is a key used for testing (to avoid expensive keygen)
func RandTestBogusPrivateKey ¶
func RandTestBogusPrivateKey() (TestBogusPrivateKey, error)
func RandTestBogusPrivateKeyOrFatal ¶
func RandTestBogusPrivateKeyOrFatal(t *testing.T) TestBogusPrivateKey
func (TestBogusPrivateKey) Bytes ¶
func (sk TestBogusPrivateKey) Bytes() ([]byte, error)
func (TestBogusPrivateKey) Decrypt ¶
func (sk TestBogusPrivateKey) Decrypt(b []byte) ([]byte, error)
func (TestBogusPrivateKey) Equals ¶
func (sk TestBogusPrivateKey) Equals(k ic.Key) bool
Equals checks whether this key is equal to another
func (TestBogusPrivateKey) GenSecret ¶
func (sk TestBogusPrivateKey) GenSecret() []byte
func (TestBogusPrivateKey) GetPublic ¶
func (sk TestBogusPrivateKey) GetPublic() ic.PubKey
func (TestBogusPrivateKey) Raw ¶
func (sk TestBogusPrivateKey) Raw() ([]byte, error)
Raw returns the raw bytes of the key (not wrapped in the libp2p-crypto protobuf).
func (TestBogusPrivateKey) Sign ¶
func (sk TestBogusPrivateKey) Sign(message []byte) ([]byte, error)
func (TestBogusPrivateKey) Type ¶
func (pk TestBogusPrivateKey) Type() pb.KeyType
Type returns the protobof key type.
type TestBogusPublicKey ¶
type TestBogusPublicKey []byte
TestBogusPublicKey is a key used for testing (to avoid expensive keygen)
func RandTestBogusPublicKey ¶
func RandTestBogusPublicKey() (TestBogusPublicKey, error)
func RandTestBogusPublicKeyOrFatal ¶
func RandTestBogusPublicKeyOrFatal(t *testing.T) TestBogusPublicKey
func (TestBogusPublicKey) Bytes ¶
func (pk TestBogusPublicKey) Bytes() ([]byte, error)
func (TestBogusPublicKey) Equals ¶
func (pk TestBogusPublicKey) Equals(k ic.Key) bool
Equals checks whether this key is equal to another
func (TestBogusPublicKey) Raw ¶
func (pk TestBogusPublicKey) Raw() ([]byte, error)
Raw returns the raw bytes of the key (not wrapped in the libp2p-crypto protobuf).
func (TestBogusPublicKey) RawFull ¶
func (pk TestBogusPublicKey) RawFull() ([]byte, error)
func (TestBogusPublicKey) Type ¶
func (pk TestBogusPublicKey) Type() pb.KeyType
Type returns the protobof key type.
Click to show internal directories.
Click to hide internal directories.