Documentation ¶
Index ¶
- Constants
- Variables
- func DecryptAES256(inputData []byte, key AES256Key) ([]byte, error)
- func EncryptAES256(inputData []byte, key AES256Key) ([]byte, error)
- func PadPKCS5(data []byte, blockSize int) []byte
- func RandomBytes(n int) []byte
- func UnpadPKCS5(data []byte, blockSize int) ([]byte, error)
- type AES256Key
- func (key AES256Key) Bytes() []byte
- func (key *AES256Key) FromBase64(s string) error
- func (key *AES256Key) FromHex(s string) error
- func (key AES256Key) Hex() string
- func (key AES256Key) IsZero() bool
- func (key AES256Key) MarshalJSON() ([]byte, error)
- func (pkey *AES256Key) UnmarshalJSON(data []byte) error
Constants ¶
View Source
const (
AES256IVSize int = aes.BlockSize
)
Variables ¶
View Source
var Zero = AES256Key{}
Functions ¶
func RandomBytes ¶
Types ¶
type AES256Key ¶
type AES256Key [32]byte
func (*AES256Key) FromBase64 ¶
func (AES256Key) MarshalJSON ¶
func (*AES256Key) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.