Documentation
¶
Index ¶
- type CryptoService
- type CryptoServiceImpl
- func (c *CryptoServiceImpl) GenerateKeyPair() (*ecdsa.PrivateKey, *ecdsa.PublicKey, error)
- func (c *CryptoServiceImpl) Hash(data []byte) []byte
- func (c *CryptoServiceImpl) Sign(privateKey *ecdsa.PrivateKey, data []byte) []byte
- func (c *CryptoServiceImpl) VerifySignature(key []byte, hash []byte, bytes []byte) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CryptoService ¶
type CryptoServiceImpl ¶
type CryptoServiceImpl struct {
// contains filtered or unexported fields
}
func NewCryptoService ¶
func NewCryptoService(logger logging.Logger) *CryptoServiceImpl
func (*CryptoServiceImpl) GenerateKeyPair ¶
func (c *CryptoServiceImpl) GenerateKeyPair() (*ecdsa.PrivateKey, *ecdsa.PublicKey, error)
func (*CryptoServiceImpl) Hash ¶
func (c *CryptoServiceImpl) Hash(data []byte) []byte
func (*CryptoServiceImpl) Sign ¶
func (c *CryptoServiceImpl) Sign(privateKey *ecdsa.PrivateKey, data []byte) []byte
func (*CryptoServiceImpl) VerifySignature ¶
func (c *CryptoServiceImpl) VerifySignature(key []byte, hash []byte, bytes []byte) bool
Click to show internal directories.
Click to hide internal directories.