steveloughran commented on a change in pull request #2707:
URL: https://github.com/apache/hadoop/pull/2707#discussion_r580296243



##########
File path: 
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsClient.java
##########
@@ -88,6 +96,21 @@ private AbfsClient(final URL baseUrl, final 
SharedKeyCredentials sharedKeyCreden
     this.accountName = abfsConfiguration.getAccountName().substring(0, 
abfsConfiguration.getAccountName().indexOf(AbfsHttpConstants.DOT));
     this.authType = abfsConfiguration.getAuthType(accountName);
 
+    String encryptionKey = 
this.abfsConfiguration.getClientProvidedEncryptionKey();
+    if (encryptionKey != null) {
+      this.clientProvidedEncryptionKey = encryptionKey;
+      try {
+        MessageDigest digester = MessageDigest.getInstance("SHA-256");
+        digester.update(encryptionKey.getBytes());
+        this.clientProvidedEncryptionKeySHA = 
Base64.getEncoder().encodeToString(digester.digest());
+      } catch (NoSuchAlgorithmException e) {
+        throw new IOException(e);

Review comment:
       * will this include information about the requested algorithm? 
   * will this surface when the JVM doesn' t have the unrestricted crypto 
extension settings? If so, error text should mention it.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to