Documentation ¶
Index ¶
- Constants
- type Decrypter
- type Encrypter
- type FdbSecurityProvider
- func (fs FdbSecurityProvider) Decrypt(dataByte []byte, fileName string, data *gjson.Result) (res []byte, err error)
- func (fs FdbSecurityProvider) Encrypt(dataByte []byte, fileName string, data *gjson.Result) (res []byte, err error)
- func (fs FdbSecurityProvider) GenerateSecurityKey(fileName string, data *gjson.Result) (key []byte, err error)
- type SecurityConfig
- type SecurityProvider
Constants ¶
View Source
const ( // EmptySTR represents empty string EmptySTR = "" )SharedPrefix = "ss_"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decrypter ¶
type Encrypter ¶
type FdbSecurityProvider ¶
type FdbSecurityProvider struct {
// contains filtered or unexported fields
}
func New ¶
func New(config SecurityConfig) FdbSecurityProvider
func (FdbSecurityProvider) Decrypt ¶
func (fs FdbSecurityProvider) Decrypt(dataByte []byte, fileName string, data *gjson.Result) (res []byte, err error)
Decrypt - decrypts provide data
type SecurityConfig ¶
type SecurityConfig struct { EncKey string // the global encryption key used in the project. This key will be applicable in all cases. UserDefinedKey string // the user defined key in the project. This key will be applicable in all cases. FieldQuery string // query to get dynamic field. Ex. Each student data can be encrypted with studentID. Applicable only for the shared bucket. }
Click to show internal directories.
Click to hide internal directories.