this.userProvidedLength); try { this.cryptoStream = this.encryptionPolicy.decryptBlob(lengthLimitingStream, this.metadata, this.requireEncryption, !this.bufferIV ? null : this.iv, this.noPadding);
if (options.getEncryptionPolicy() != null) outStream = BlobEncryptionPolicy.wrapUserStreamWithDecryptStream(blob, userStream, options, blob.metadata, blob.properties.getLength(), isRangeGet, endOffsetFinal, userSpecifiedLength, discardFirstFinal, bufferIVFinal);
Cipher cipher = options.getEncryptionPolicy().createAndSetEncryptionContext(this.getMetadata(), false /* noPadding */); GettableByteArrayOutputStream targetStream = new GettableByteArrayOutputStream(); long byteCount = Utility.encryptStreamIfUnderThreshold(inputDataStream, targetStream, cipher, descriptor.getLength(),
Cipher cipher = options.getEncryptionPolicy().createAndSetEncryptionContext(this.getMetadata(), false /* noPadding */); return new BlobEncryptStream(this, accessCondition, options, opContext, cipher); } else {
cipher = options.getEncryptionPolicy().createAndSetEncryptionContext(this.getMetadata(), true /* noPadding */);
OutputStream decryptStream = options.getEncryptionPolicy().decryptBlob(userProvidedStream, metadata, options.requireEncryption(), null, blob.getProperties().getBlobType() == BlobType.PAGE_BLOB); return decryptStream;
cipher = options.getEncryptionPolicy().createAndSetEncryptionContext(this.getMetadata(), false /* noPadding */);