package
0.1.4
Repository: https://github.com/goatext/commons.git
Documentation: pkg.go.dev

# Functions

Decrypt decrypts ciphertext using the passphrase.
No description provided by the author
Decrypt decrypts ciphertext using the passphrase.
No description provided by the author
Encrypt encrypts plain text using passphrase.
Encrypt encrypts plain text using passphrase bytes.
Encrypts the plain text using the passphrase and returns an EncryptResult struct containing the Salt, the Initialization Vector and the encrypted data.
No description provided by the author
Generates OTP using secure random.
No description provided by the author
Loads a Pemfile using the file path from file system.
No description provided by the author
No description provided by the author
RsaDecryptWithPrivateKey decrypts data with private key.
RsaEncodePrivateKeyToPEM encodes Private Key from RSA to PEM format.
RsaEncodePublicKeyToPEM take a rsa.PublicKey and return bytes suitable for writing to .pub file returns in the format "ssh-rsa ...".
RsaEncryptWithPublicKey encrypts data with public key.
No description provided by the author
RsaGeneratePrivateKey creates a RSA Private Key of specified byte size.
Parse PEM encoded PKCS1 or PKCS8 private key.
Parse PEM encoded PKCS1 or PKCS8 public key.
Signs a message (for example an struct) with the given RSA private key Input: The message to sign, it must be serializable to a JSON the RSA Privatekey to sign the message Output: The signature as byte array the error if there is any error getting the Hash or the signature.
Verifies a message (for example an struct) signature using RSA public key Input: The message to verify, it must be serializable to a JSON.

# Variables

No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author