| 192 | |
| 193 | namespace { |
| 194 | BlobGranuleFileEncryptionKeys getEncryptBlobCipherKey(const BlobGranuleCipherKeysCtx cipherKeysCtx) { |
| 195 | BlobGranuleFileEncryptionKeys eKeys; |
| 196 | |
| 197 | eKeys.textCipherKey = makeReference<BlobCipherKey>(cipherKeysCtx.textCipherKey.encryptDomainId, |
| 198 | cipherKeysCtx.textCipherKey.baseCipherId, |
| 199 | cipherKeysCtx.textCipherKey.baseCipher.begin(), |
| 200 | cipherKeysCtx.textCipherKey.baseCipher.size(), |
| 201 | cipherKeysCtx.textCipherKey.salt); |
| 202 | eKeys.headerCipherKey = makeReference<BlobCipherKey>(cipherKeysCtx.headerCipherKey.encryptDomainId, |
| 203 | cipherKeysCtx.headerCipherKey.baseCipherId, |
| 204 | cipherKeysCtx.headerCipherKey.baseCipher.begin(), |
| 205 | cipherKeysCtx.headerCipherKey.baseCipher.size(), |
| 206 | cipherKeysCtx.headerCipherKey.salt); |
| 207 | |
| 208 | return eKeys; |
| 209 | } |
| 210 | |
| 211 | void validateEncryptionHeaderDetails(const BlobGranuleFileEncryptionKeys& eKeys, |
| 212 | const BlobCipherEncryptHeader& header, |