Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptWithRSA ¶ added in v0.3.0
DecryptWithRSA decrypts the given encrypted data with RSA-OAEP. privKey must be a RSA private key in PEM or DER format.
func EncryptWithRSA ¶ added in v0.3.0
EncryptWithRSA encrypts the given data with RSA-OAEP. pubKey must be a RSA public key in PEM or DER format.
Types ¶
type GPG ¶ added in v0.3.0
type GPG interface { // EncryptWithRecipient encrypts a given plaintext using a given user's public-key. EncryptWithRecipient(ctx context.Context, plaintext []byte, userID string) ([]byte, error) // DecryptWithRecipient decrypts a given encrypted data using a given user's private-key. DecryptWithRecipient(ctx context.Context, encrypted []byte, userID string) ([]byte, error) }
GPG works as a GPG client.
Click to show internal directories.
Click to hide internal directories.