Versions in this module Expand all Collapse all v1 v1.0.0 Aug 24, 2023 Changes in this version + const RSA2048Bits + var CertOptDefault = CertOption + func AESDecryptCBC(keySt []byte, ciphertext []byte) (decrypted []byte, err error) + func AESEncryptCBC(keyByte []byte, plaintext []byte) ([]byte, error) + func AESGenerate256Key() (key []byte, err error) + func RSADecryptOAEP(ciphertext, privateKey []byte) (output []byte, err error) + func RSAEncryptOAEP(publicKey, data []byte) (output []byte, err error) + func RSASignMessage(message []byte, signKey []byte) (signature string, err error) + func RSAVerifySignature(sig string, message []byte, verifyKey []byte) error + type CertOption struct + EmailAddresses []string + Issuer pkix.Name + MakeExpires func() time.Time + SubjectNameObject pkix.Name + type HASH []byte + func SHA256(data []byte) HASH + func (value HASH) Hex() string + type Keypair struct + PrivateKey []byte + PublicKey []byte + type OpenSSL struct + func (ssl *OpenSSL) Certificate() *x509.Certificate + func (ssl *OpenSSL) ExportP12(pwd string, output string) error + func (ssl *OpenSSL) GenRSA(bits uint32, args ...string) (err error) + func (ssl *OpenSSL) ImportP12(data []byte, pwd string) error + func (ssl *OpenSSL) MakeCertificate(opt *CertOption) error + func (ssl *OpenSSL) PrivateKey() *rsa.PrivateKey