You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2018/06/11 15:19:09 UTC

[GitHub] milleruntime commented on a change in pull request #499: Implement new Encryption interface

milleruntime commented on a change in pull request #499: Implement new Encryption interface
URL: https://github.com/apache/accumulo/pull/499#discussion_r194443011
 
 

 ##########
 File path: core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/BCFile.java
 ##########
 @@ -403,20 +355,13 @@ public void close() throws IOException {
           long offsetIndexMeta = out.position();
           metaIndex.write(out);
 
-          if (cryptoParams.getCipherSuite() == null || cryptoParams.getCipherSuite()
-              .equals(Property.CRYPTO_CIPHER_SUITE.getDefaultValue())) {
-            out.writeLong(offsetIndexMeta);
-            API_VERSION_1.write(out);
-          } else {
-            long offsetCryptoParameters = out.position();
-            cryptoParams.write(out);
-
-            // Meta Index, crypto params offsets and the trailing section are written out directly.
-            out.writeLong(offsetIndexMeta);
-            out.writeLong(offsetCryptoParameters);
-            API_VERSION.write(out);
-          }
+          long offsetCryptoParameter = out.position();
+          String es = this.encryptionStrategy.getClass().getName();
+          out.writeUTF(es);
 
 Review comment:
   I like these are good ideas.  I wrote the class name because it was easiest and wasn't sure how to handle changing encryption strategies. 
   
   @ctubbsii do @keith-turner 's ideas match up with your thoughts?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services