forked from TrueCloudLab/frostfs-s3-gw
[#595] Move decrypter to separate package
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
parent
d824db7f69
commit
94a6a55919
14 changed files with 445 additions and 427 deletions
|
@ -161,7 +161,7 @@ func encryptionReader(r io.Reader, size uint64, key []byte) (io.Reader, uint64,
|
|||
return r, encSize, nil
|
||||
}
|
||||
|
||||
func parseCompletedPartHeader(hdr string) (*Part, error) {
|
||||
func ParseCompletedPartHeader(hdr string) (*Part, error) {
|
||||
// partInfo[0] -- part number, partInfo[1] -- part size, partInfo[2] -- checksum
|
||||
partInfo := strings.Split(hdr, "-")
|
||||
if len(partInfo) != 3 {
|
||||
|
@ -268,9 +268,8 @@ func (n *layer) PutObject(ctx context.Context, p *PutObjectParams) (*data.Object
|
|||
n.listsCache.CleanCacheEntriesContainingObject(p.Object, p.BktInfo.CID)
|
||||
|
||||
objInfo := &data.ObjectInfo{
|
||||
ID: id,
|
||||
CID: p.BktInfo.CID,
|
||||
EncryptionInfo: formEncryptionInfo(p.Header),
|
||||
ID: id,
|
||||
CID: p.BktInfo.CID,
|
||||
|
||||
Owner: own,
|
||||
Bucket: p.BktInfo.Name,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue