Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SoftEncryptor ¶
type SoftEncryptor struct {
// contains filtered or unexported fields
}
SoftEncryptor encrypts data or decrypts encoded data
func New ¶
func New(conf *config.SoftEncryptorConf) (*SoftEncryptor, error)
New creat SoftEncryptor by "password" configuration
func (*SoftEncryptor) Encrypt ¶
func (se *SoftEncryptor) Encrypt(r io.Reader, opt *encryptor.EncryptOptions) ( encryptor.EncryptedSlice, error)
Encrypt derive key using nodeID and slice ID, then encrypt content using AES-GCM
func (*SoftEncryptor) GetKey ¶
func (se *SoftEncryptor) GetKey(fileID, sliceID string, nodeID []byte) aes.AESKey
GetKey derive key using fileID, nodeID and slice ID
func (*SoftEncryptor) Recover ¶
func (se *SoftEncryptor) Recover(r io.Reader, opt *encryptor.RecoverOptions) ( []byte, error)
Recover derive key using nodeID and slice ID, then decrypt content using AES-GCM
Click to show internal directories.
Click to hide internal directories.