package
1.2.0
Repository: https://github.com/sweet-go/stdlib.git
Documentation: pkg.go.dev

# Packages

Package encryption_mock is a generated GoMock package.

# Functions

Decrypt will decrypt the data using rsa.DecryptOAEP.
DecryptFile will decrypt the file using AES and save the decrypted file to opts.OutputPath.
DecryptFromBase64 wrapper for Decrypt then decode the input from base64.
Encrypt will encrypt the data using rsa.EncryptOAEP.
EncryptFile will encrypt the file using AES.
EncryptToBase64 wrapper for Encrypt then encode the output to base64.
EncryptWithSteps will encrypt the data using rsa.EncryptOAEP chunk by chunk.
GenerateKey generate private and public key.
NewJWTTokenHandler creates a new JWTTokenGenerator.
ParseTestKey is a helper function to parse a test key to avoid test key detected as real key.
ReadKey will read private key in form of []byte.
ReadKeyFromFile wrapper for ReadKey with option to read file based on path location.
ReadPublicKey will read public key.
ReadPublicKeyFromFile wrapper for ReadPublicKey with option to read file based on path location this function will return only public key and set private key to nil.
SHA256Hash will return the SHA256 hash of the data.
Sign will generate signature based on supplied message.
SignToBase64 wrapper for Sign with the output are base64 encoded string.
Verify will verify the signature of a message.

# Constants

list of available aes key length to choose from.
list of available aes key length to choose from.
list of available aes key length to choose from.

# Structs

DecryptionOpts is the options for decryption.
FileEncryptionOpts is the options for file encryption & decryption.
KeyComponent is a struct that contains private key, public key, and bytes.
KeyGenerationOpts option to generate key.
Opts is the options for encryption.
SignOpts is a struct that contains the options for signing a message.
VerifyOpts is a struct that contains the options for verifying a message.

# Interfaces

JWTTokenGenerator is an interface for working with JWT tokens.

# Type aliases

AESKeyLength is the length of AES key.