Documentation
¶
Index ¶
- Variables
- func CryptoSign(sm *C.uchar, smlen *C.ulonglong, m *C.uchar, mlen C.ulonglong, sk *C.uchar) int
- func CryptoSignKeyPair(pk *C.uchar, sk *C.uchar) int
- func CryptoSignOpen(m *C.uchar, mlen *C.ulonglong, sm *C.uchar, smlen C.ulonglong, pk *C.uchar) int
- func GenerateKey() (pk *PublicKey, sk *PrivateKey, err error)
- func PrintHex(data []byte)
- type PrivateKey
- type PublicKey
Constants ¶
This section is empty.
Variables ¶
View Source
var CRYPTO_ALGNAME string = C.CRYPTO_ALGNAME
View Source
var CRYPTO_BYTES int = C.CRYPTO_BYTES
View Source
var CRYPTO_PUBLICKEYBYTES int = C.CRYPTO_PUBLICKEYBYTES
View Source
var CRYPTO_SECRETKEYBYTES int = C.CRYPTO_SECRETKEYBYTES
View Source
var C_CRYPTO_BYTES C.int = C.CRYPTO_BYTES
View Source
var C_CRYPTO_PUBLICKEYBYTES C.int = C.CRYPTO_PUBLICKEYBYTES
View Source
var C_CRYPTO_SECRETKEYBYTES C.int = C.CRYPTO_SECRETKEYBYTES
Functions ¶
func CryptoSign ¶
func CryptoSignOpen ¶
func GenerateKey ¶
func GenerateKey() (pk *PublicKey, sk *PrivateKey, err error)
Types ¶
type PrivateKey ¶
type PrivateKey struct {
// contains filtered or unexported fields
}
func PrivateKeyFromBytes ¶
func PrivateKeyFromBytes(data []byte) (*PrivateKey, error)
func (*PrivateKey) Bytes ¶
func (priv *PrivateKey) Bytes() []byte
func (*PrivateKey) Public ¶
func (priv *PrivateKey) Public() crypto.PublicKey
func (*PrivateKey) Sign ¶
func (priv *PrivateKey) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) (signature []byte, err error)
type PublicKey ¶
type PublicKey struct {
// contains filtered or unexported fields
}
func PublicKeyFromBytes ¶
Click to show internal directories.
Click to hide internal directories.