Documentation
¶
Index ¶
- Constants
- func Aes(message, key []byte) aesCrypto
- func GUnzipData(data []byte) (resData []byte, err error)
- func GZipData(data []byte) (compressedData []byte, err error)
- func Import(privateKey, publicKey []byte) (*keyPair, error)
- func ImportPublic(publicKey []byte) (*keyPair, error)
- func QuickAesEncrypt(message []byte) ([]byte, []byte, error)
- func RandArray() []byte
- func Secp256k1() (*keyPair, error)
- func Secp256k1A() (*ecdsa.PrivateKey, *ecdsa.PublicKey, error)
- func Secp256k1Decrypt(message []byte, privateKey *ecdsa.PrivateKey) ([]byte, error)
- func Secp256k1Encrypt(message []byte, publicKey *ecdsa.PublicKey) ([]byte, error)
- func Secp256k1Signature(message []byte, privateKey *ecdsa.PrivateKey) ([]byte, error)
- func Secp256k1SignatureVerify(message, signature []byte, publicKey *ecdsa.PublicKey) bool
Constants ¶
View Source
const ( // DEFAULT_RAND_ARRAY // random factor length DEFAULT_RAND_ARRAY int = 32 )
Variables ¶
This section is empty.
Functions ¶
func Aes ¶
func Aes(message, key []byte) aesCrypto
Aes this func can be import Ciphertext or export Ciphertext this func will be removed(2021/10/30)
func GUnzipData ¶
func ImportPublic ¶
func QuickAesEncrypt ¶
QuickAesEncrypt dedicated to those lazy people 献给那些懒🐕
func RandArray ¶
func RandArray() []byte
RandArray 生成一个由{DEFAULT_RAND_ARRAY}指定长度的字符串([]byte)并提取Hash 随机从Hash中提取长度与Hash值等同的一组[]byte 返回这组[]byte中的前16位 Generate a string ([]byte) with a length specified by {DEFAULT_RAND_ARRAY} and extract the Hash Randomly extract a group of []byte with the same length as the hash value from Hash Return the first 128 bits in this group of []byte
func Secp256k1A ¶
func Secp256k1A() (*ecdsa.PrivateKey, *ecdsa.PublicKey, error)
func Secp256k1Decrypt ¶
func Secp256k1Decrypt(message []byte, privateKey *ecdsa.PrivateKey) ([]byte, error)
func Secp256k1Encrypt ¶
func Secp256k1Signature ¶
func Secp256k1Signature(message []byte, privateKey *ecdsa.PrivateKey) ([]byte, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.