Documentation ¶
Index ¶
- func AesDecryptECB(encrypted []byte, key []byte) (decrypted []byte)
- func AesEncryptECB(origData []byte, key []byte) (encrypted []byte)
- func EcdsaDecrypt(ciphertext, privateKey []byte) ([]byte, error)
- func EcdsaEncrypt(origData, publicKey []byte) ([]byte, error)
- func EcdsaSign(origData, privateKey []byte) (signature_encode string, err error)
- func EcdsaVerify(origData, signature string, publicKey []byte) error
- func GenerateAesKey(data string) string
- func GenerateBitKey() ([]byte, []byte, error)
- func GenerateEcdsaKey() ([]byte, []byte, error)
- func GenerateRsaKey() ([]byte, []byte, error)
- func GetRandom(n int, isNO bool) string
- func GetRandomInt(max *big.Int) (int, error)
- func GetSharedKey(private, public []byte) ([]byte, error)
- func Md5(data string) string
- func RsaDecrypt(ciphertext, privateKey []byte) ([]byte, error)
- func RsaEncrypt(origData, publicKey []byte) ([]byte, error)
- func RsaSign(origData, privateKey []byte) (string, error)
- func RsaVerify(origData, signature, publicKey []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AesDecryptECB ¶
func AesEncryptECB ¶
func EcdsaDecrypt ¶
func EcdsaEncrypt ¶
func EcdsaVerify ¶
func GenerateAesKey ¶
=================== ECB ======================
func GenerateBitKey ¶
=================== ECDH ==================================== Generate elliptic curve key pair using secp256k1
func GenerateEcdsaKey ¶
Generate elliptic curve key pair using secp256r1
func GenerateRsaKey ¶
=================== RSA ==================================== https://www.sohamkamani.com/golang/rsa-encryption/
func GetRandomInt ¶
=================== random ===================
func GetSharedKey ¶
func RsaDecrypt ¶
func RsaEncrypt ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.