Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPrivateKey ¶
func NewPrivateKey() (crypto.PrivateKey, error)
Types ¶
type Suite ¶
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.