Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnknown = errors.New(`unknown`) ErrTypeRequired = errors.New(`type required`) DefaultConfig = &Config{ Type: ecdsa.Module, Options: ecdsa.DefaultOpts, } DefaultSuite, _ = NewSuiteByConfig(DefaultConfig, false) )
Functions ¶
func RandomBytes ¶
RandomBytes returns slice of random bytes of presented size
Types ¶
type Suite ¶ added in v0.10.0
type Suite interface { // Sign is used for signing message by presented private key Sign(msg []byte, key interface{}) ([]byte, error) // Verify is used for verifying signature for presented message and public key Verify(publicKey interface{}, msg, sig []byte) error // Hash is used for hashing presented data Hash(data []byte) []byte // NewPrivateKey generates new private key NewPrivateKey() (interface{}, error) // GetSignatureAlgorithm returns signature algorithm GetSignatureAlgorithm() x509.SignatureAlgorithm }
Suite describes common cryptographic operations
Click to show internal directories.
Click to hide internal directories.