Documentation
¶
Index ¶
- func Decrypt(w io.Writer, r io.Reader) error
- func Encrypt(w io.Writer, r io.Reader) error
- func GenerateBytes(n int) ([]byte, error)
- func Init(c Crypterer)
- type Crypterer
- type EncryptedBytes
- func (e EncryptedBytes) Bytes() []byte
- func (e *EncryptedBytes) GormDBDataType(db *gorm.DB, field *schema.Field) string
- func (e *EncryptedBytes) GormDataType() string
- func (e EncryptedBytes) MarshalJSON() ([]byte, error)
- func (e *EncryptedBytes) Scan(value interface{}) error
- func (e EncryptedBytes) String() string
- func (e *EncryptedBytes) UnmarshalJSON(data []byte) error
- func (e EncryptedBytes) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateBytes ¶
GenerateBytes generates random bytes of n length.
Types ¶
type EncryptedBytes ¶
type EncryptedBytes []byte
func NewEncryptedBytes ¶
func NewEncryptedBytes(s string) EncryptedBytes
func (EncryptedBytes) Bytes ¶
func (e EncryptedBytes) Bytes() []byte
func (*EncryptedBytes) GormDBDataType ¶
func (*EncryptedBytes) GormDataType ¶
func (e *EncryptedBytes) GormDataType() string
func (EncryptedBytes) MarshalJSON ¶
func (e EncryptedBytes) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler interface
func (*EncryptedBytes) Scan ¶
func (e *EncryptedBytes) Scan(value interface{}) error
Scan implements the scanner interface
func (EncryptedBytes) String ¶
func (e EncryptedBytes) String() string
func (*EncryptedBytes) UnmarshalJSON ¶
func (e *EncryptedBytes) UnmarshalJSON(data []byte) error
UnmarshalJSON implements json.Unmarshaler interface
Click to show internal directories.
Click to hide internal directories.