Struct: s3crypto.HeaderV2LoadStrategy

import "../ibm-cos-sdk-go/service/s3/s3crypto"

Overview

Load from a given object's header

Implemented Interfaces

s3crypto.Cipher, s3crypto.LoadStrategy, s3manager.ReadSeekerWriteTo, s3manager.WriterReadFrom

Method Summary collapse

Method Details

func (load HeaderV2LoadStrategy) Load(req *request.Request) (Envelope, error)



112
113
114
115
116
117
118
119
120
121
122
// File 'service/s3/s3crypto/strategy.go', line 112

func (load HeaderV2LoadStrategy) Load(req *request.Request) (Envelope, error) { env := Envelope{} env.CipherKey = req.HTTPResponse.Header.Get(strings.Join([]string{metaHeader, keyV2Header}, "-")) env.IV = req.HTTPResponse.Header.Get(strings.Join([]string{metaHeader, ivHeader}, "-")) env.MatDesc = req.HTTPResponse.Header.Get(strings.Join([]string{metaHeader, matDescHeader}, "-")) env.WrapAlg = req.HTTPResponse.Header.Get(strings.Join([]string{metaHeader, wrapAlgorithmHeader}, "-")) env.CEKAlg = req.HTTPResponse.Header.Get(strings.Join([]string{metaHeader, cekAlgorithmHeader}, "-")) env.TagLen = req.HTTPResponse.Header.Get(strings.Join([]string{metaHeader, tagLengthHeader}, "-")) env.UnencryptedContentLen = req.HTTPResponse.Header.Get(strings.Join([]string{metaHeader, unencryptedContentLengthHeader}, "-")) return env, nil }