Documentation
¶
Overview ¶
Default crypters: - AES GCM HMAC - AES CTR HMAC
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AES_CTR ¶
type AES_CTR struct {
// contains filtered or unexported fields
}
Default crypter type; uses AES CTR HMAC
func New_AES_CTR ¶
Creates a new AES CTR HMAC object
func (*AES_CTR) Decrypt ¶
Decrypts data and returns the plaintext string of the encrypted data or error. The returned errors can be related to authentication or some sort of other failure
type AES_GCM ¶
type AES_GCM struct {
// contains filtered or unexported fields
}
Default crypter type; uses AES GCM HMAC
func New_AES_GCM ¶
Creates a new AES GCM HMAC object
func (*AES_GCM) Decrypt ¶
Decrypts data and returns the plaintext string of the encrypted data or error. The returned errors can be related to authentication or some sort of other failure
type CrypterI ¶
type CrypterI interface {
/*
Should encrypt given data and return it in base64 format
*/
Encrypt(data string) (string, error)
/*
Should Decrypt given data and return its plaintext.
'data' here is the base64 encoded string, when the data is decoded it represents
the encryption cipher text in bytes
*/
Decrypt(data string) (string, error)
}
# CrypterI object Exposes the special methods a crypter has to introduce to satisfy the crypter interface.
For examples please consider looking at the simpa/engine/crypt examples. Like:
- AES_GCM HMAC
- AES_CTR HMAC
This crypter is used for securecookie's and sessions.
The crypter object should be set using: [Engine SecureCookie]: https://pkg.go.dev/github.com/SimpaiX-net/simpa/engine#Engines
Source Files
¶
- crypter.go