Documentation ¶
Overview ¶
Package aes is a wrapped for AES/ECB/PKCS5PADDING
Index ¶
- Variables
- type CBC
- func (a *CBC) Decrypt(ctx context.Context, encryptedData []byte) (plainData []byte, err error)
- func (a *CBC) DecryptString(ctx context.Context, encryptedData string) (string, error)
- func (a *CBC) Encrypt(ctx context.Context, plainBlob []byte) ([]byte, error)
- func (a *CBC) EncryptString(ctx context.Context, data string) (string, error)
- type ECB
- type GCM
- func (a *GCM) Decrypt(ctx context.Context, encryptedData []byte) (plainData []byte, err error)
- func (a *GCM) DecryptString(ctx context.Context, encryptedText string) (string, error)
- func (a *GCM) Encrypt(ctx context.Context, plainBlob []byte) ([]byte, error)
- func (a *GCM) EncryptString(ctx context.Context, plainText string) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBlockError = fmt.Errorf("cipher text is not a multiple of the block size")
View Source
var ErrIVLengthMismatch = fmt.Errorf("IV length is not matching with block size")
View Source
var ErrInvalidKeyLength = fmt.Errorf("invalid key length")
Functions ¶
This section is empty.
Types ¶
type CBC ¶
type CBC struct {
// contains filtered or unexported fields
}
func NewCBCPKCS7 ¶
func (*CBC) DecryptString ¶
Click to show internal directories.
Click to hide internal directories.