Documentation
¶
Overview ¶
Package crypto
@author: xwc1125
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ECDSA ¶
type ECDSA interface {
GenerateKey(curve elliptic.Curve) (*ecdsa.PrivateKey, error)
HashType(curveName string) crypto.Hash
HashFunc(cryptoName string) func() hash.Hash
HashMsg(cryptoName string, data []byte) ([]byte, error)
ToECDSA(prv crypto.PrivateKey) *ecdsa.PrivateKey
FromECDSA(prv *ecdsa.PrivateKey) crypto.PrivateKey
ToECDSAPubKey(pub crypto.PublicKey) *ecdsa.PublicKey
FromECDSAPubKey(pub *ecdsa.PublicKey) crypto.PublicKey
MarshalPrivateKey(key *ecdsa.PrivateKey) ([]byte, error)
UnmarshalPrivateKey(curve elliptic.Curve, keyBytes []byte) (*ecdsa.PrivateKey, error)
MarshalPublicKey(pub *ecdsa.PublicKey) ([]byte, error)
UnmarshalPublicKey(curve elliptic.Curve, data []byte) (*ecdsa.PublicKey, error)
MarshalPrivateKeyX509(key *ecdsa.PrivateKey) ([]byte, error)
UnmarshalPrivateKeyX509(curve elliptic.Curve, keyBytes []byte) (*ecdsa.PrivateKey, error)
MarshalPublicKeyX509(pub *ecdsa.PublicKey) ([]byte, error)
UnmarshalPublicKeyX509(curve elliptic.Curve, data []byte) (*ecdsa.PublicKey, error)
Sign(prv *ecdsa.PrivateKey, hash []byte) (sig []byte, err error)
Verify(pub *ecdsa.PublicKey, hash []byte, signature []byte) bool
}
Directories
¶
| Path | Synopsis |
|---|---|
|
base
|
|
|
base36
Package base36 @author: xwc1125
|
Package base36 @author: xwc1125 |
|
base58
Package base58 @author: xwc1125
|
Package base58 @author: xwc1125 |
|
Package bn256 implements the Optimal Ate pairing over a 256-bit Barreto-Naehrig curve.
|
Package bn256 implements the Optimal Ate pairing over a 256-bit Barreto-Naehrig curve. |
|
cloudflare
Package bn256 implements a particular bilinear group at the 128-bit security level.
|
Package bn256 implements a particular bilinear group at the 128-bit security level. |
|
google
Package bn256 implements a particular bilinear group.
|
Package bn256 implements a particular bilinear group. |
|
Package hashalg @author: xwc1125 Package hashalg @author: xwc1125
|
Package hashalg @author: xwc1125 Package hashalg @author: xwc1125 |
|
blake2b
Package blake2b implements the BLAKE2b hash algorithm defined by RFC 7693 and the extendable output function (XOF) BLAKE2Xb.
|
Package blake2b implements the BLAKE2b hash algorithm defined by RFC 7693 and the extendable output function (XOF) BLAKE2Xb. |
|
sha3
Package sha3 implements the SHA-3 fixed-output-length hash functions and the SHAKE variable-output-length hash functions defined by FIPS-202.
|
Package sha3 implements the SHA-3 fixed-output-length hash functions and the SHAKE variable-output-length hash functions defined by FIPS-202. |
|
Package icap @author: xwc1125 Package icap @author: xwc1125 Package icap @author: xwc1125 Package icap @author: xwc1125
|
Package icap @author: xwc1125 Package icap @author: xwc1125 Package icap @author: xwc1125 Package icap @author: xwc1125 |
|
Package scrypt @author: xwc1125 Package scrypt @author: xwc1125 Package scrypt @author: xwc1125
|
Package scrypt @author: xwc1125 Package scrypt @author: xwc1125 Package scrypt @author: xwc1125 |
|
Package signature @author: xwc1125 Package signature @author: xwc1125 Package signature @author: xwc1125 Package signature @author: xwc1125 Package signature @author: xwc1125 Package signature @author: xwc1125 Package signature @author: xwc1125
|
Package signature @author: xwc1125 Package signature @author: xwc1125 Package signature @author: xwc1125 Package signature @author: xwc1125 Package signature @author: xwc1125 Package signature @author: xwc1125 Package signature @author: xwc1125 |
|
gmsm
Package gmsm @author: xwc1125 Package gmsm @author: xwc1125 Package gmsm @author: xwc1125 Package gmsm @author: xwc1125 Package gmsm @author: xwc1125 Package gmsm @author: xwc1125
|
Package gmsm @author: xwc1125 Package gmsm @author: xwc1125 Package gmsm @author: xwc1125 Package gmsm @author: xwc1125 Package gmsm @author: xwc1125 Package gmsm @author: xwc1125 |
|
prime256v1
Package prime256v1 @author: xwc1125 Package prime256v1 @author: xwc1125 Package prime256v1 @author: xwc1125
|
Package prime256v1 @author: xwc1125 Package prime256v1 @author: xwc1125 Package prime256v1 @author: xwc1125 |
|
secp256k1
Package secp256k1 @author: xwc1125 Package secp256k1 @author: xwc1125 Package secp256k1 @author: xwc1125 Package secp256k1 @author: xwc1125
|
Package secp256k1 @author: xwc1125 Package secp256k1 @author: xwc1125 Package secp256k1 @author: xwc1125 Package secp256k1 @author: xwc1125 |
Click to show internal directories.
Click to hide internal directories.