testutil

package
v0.3.8-dev-trailers Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2015 License: MIT Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RandPeerID = tu.RandPeerID

Functions

func DivulgeAddresses

func DivulgeAddresses(a, b inet.Network)

func GenHostSwarm

func GenHostSwarm(t *testing.T, ctx context.Context) *bhost.BasicHost

func GenSwarmNetwork

func GenSwarmNetwork(t *testing.T, ctx context.Context) *swarm.Network

func RandTestBogusIdentity

func RandTestBogusIdentity() (testutil.Identity, error)

func RandTestBogusIdentityOrFatal

func RandTestBogusIdentityOrFatal(t *testing.T) testutil.Identity

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) Hash

func (sk TestBogusPrivateKey) Hash() ([]byte, error)

func (TestBogusPrivateKey) Sign

func (sk TestBogusPrivateKey) Sign(message []byte) ([]byte, error)

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) Encrypt

func (pk TestBogusPublicKey) Encrypt(b []byte) ([]byte, error)

func (TestBogusPublicKey) Equals

func (pk TestBogusPublicKey) Equals(k ic.Key) bool

Equals checks whether this key is equal to another

func (TestBogusPublicKey) Hash

func (pk TestBogusPublicKey) Hash() ([]byte, error)

func (TestBogusPublicKey) Verify

func (pk TestBogusPublicKey) Verify(data, sig []byte) (bool, error)

Jump to

Keyboard shortcuts

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