Documentation
¶
Index ¶
- func DecryptPEMRSA(ctx context.Context, ciphertext []byte, privatekey []byte) (result []byte, err error)
- func DecryptRSA(ctx context.Context, ciphertext []byte, privatekey []byte) (result []byte, err error)
- func EncryptPEMRSA(ctx context.Context, plaintext []byte, publickey []byte) (result []byte, err error)
- func EncryptRSA(ctx context.Context, plaintext []byte, publickey []byte) (result []byte, err error)
- func GenCertificate(organization []string) (cert tls.Certificate, err error)
- func GenerateCert(organization []string) (rawCert, rawKey []byte, err error)
- func GenerateRSAKeypair(ctx context.Context) (prikey, pubkey []byte, err error)
- func GenerateRSAPEMKeypair(ctx context.Context) (prikey, pubkey []byte, err error)
- func WriteCerts(ctx context.Context, organizaiton []string, path string, name string) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptPEMRSA ¶ added in v1.1.0
func DecryptPEMRSA(ctx context.Context, ciphertext []byte, privatekey []byte) (result []byte, err error)
DecryptPEMRSA Decrypt By RSA using []byte format key
func DecryptRSA ¶
func DecryptRSA(ctx context.Context, ciphertext []byte, privatekey []byte) (result []byte, err error)
DecryptRSA Decrypt By RSA using []byte format key
func EncryptPEMRSA ¶ added in v1.1.0
func EncryptPEMRSA(ctx context.Context, plaintext []byte, publickey []byte) (result []byte, err error)
EncryptPEMRSA Encrypt By PEM format RSA using []byte format key
func EncryptRSA ¶
EncryptRSA Encrypt By RSA using []byte format key
func GenCertificate ¶
func GenCertificate(organization []string) (cert tls.Certificate, err error)
Generate Tls certificate
func GenerateCert ¶
Create private key and self-signed certificate
func GenerateRSAKeypair ¶
Generate RSA Keypair to []byte
func GenerateRSAPEMKeypair ¶ added in v1.1.0
Generate PEM format RSA Keypair
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.