core/src/main/java/org/apache/accumulo/core/file/rfile/PrintInfo.java
/**
   * Print the unencrypted parameters that tell the Crypto Service how to decrypt the file. This
   * information is useful for debugging if and how a file was encrypted.
   */
Print the unencrypted parameters that tell the Crypto Service how to decrypt the file. This
information is useful for debugging if and how a file was encrypted.
Print the unencrypted parameters that tell the Crypto Service how to decrypt the file . This information is useful for debugging if and how a file was encrypted .
private void printCryptoParams(Path path, FileSystem fs) {
    byte[] noCryptoBytes = new NoFileEncrypter().getDecryptionParameters();
    try (FSDataInputStream fsDis = fs.open(path)) {
      long fileLength = fs.getFileStatus(path).getLen();
      fsDis.seek(fileLength - 16 - Utils.Version.size() - (Long.BYTES));
      long cryptoParamOffset = fsDis.readLong();
      fsDis.seek(cryptoParamOffset);
      byte[] cryptoParams = CryptoUtils.readParams(fsDis);
      if (!Arrays.equals(noCryptoBytes, cryptoParams)) {
        System.out.println("Encrypted with Params: "
            + Key.toPrintableString(cryptoParams, 0, cryptoParams.length, cryptoParams.length));
      } else {
        System.out.println("No on disk encryption detected.");
      }
    } catch (IOException ioe) {
      log.error("Error reading crypto params", ioe);
    }
  }
private void printCryptoParams ( Path path , FileSystem fs ) { byte [ ] noCryptoBytes = new NoFileEncrypter ( ) . getDecryptionParameters ( ) ; try ( FSDataInputStream fsDis = fs . open ( path ) ) { long fileLength = fs . getFileStatus ( path ) . getLen ( ) ; fsDis . seek ( fileLength - 16 - Utils . Version . size ( ) - ( Long . BYTES ) ) ; long cryptoParamOffset = fsDis . readLong ( ) ; fsDis . seek ( cryptoParamOffset ) ; byte [ ] cryptoParams = CryptoUtils . readParams ( fsDis ) ; if ( ! Arrays . equals ( noCryptoBytes , cryptoParams ) ) { System . out . println ( "Encrypted with Params: " + Key . toPrintableString ( cryptoParams , 0 , cryptoParams . length , cryptoParams . length ) ) ; } else { System . out . println ( "No on disk encryption detected." ) ; } } catch ( IOException ioe ) { log . error ( "Error reading crypto params" , ioe ) ; } }
Print the unencrypted parameters that tell the Crypto Service how to decrypt the file.
Print the unencrypted parameters that tell the Crypto Service how to decrypt the file .