Braedon-Wooding-Displayr commented on code in PR #742:
URL:
https://github.com/apache/arrow-rs-object-store/pull/742#discussion_r3384637379
##########
src/azure/client.rs:
##########
@@ -190,6 +197,57 @@ impl AzureConfig {
}
}
+#[derive(Default, Clone, Debug)]
+pub(crate) struct AzureEncryptionHeaders {
+ pub encryption_key: Option<String>,
+ pub encryption_key_sha256: Option<String>,
+}
+
+impl AzureEncryptionHeaders {
+ pub(crate) fn try_new(encryption_key: Option<String>) -> Result<Self> {
+ let Some(encryption_key) = encryption_key else {
+ return Ok(Self::default());
+ };
+
+ let decoded_key = BASE64_STANDARD
+ .decode(encryption_key.as_bytes())
+ .map_err(|source| crate::Error::Generic {
+ store: STORE,
+ source: Box::new(source),
+ })?;
+
+ if decoded_key.len() != 32 {
Review Comment:
Yes it is! I'll add a comment.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]