HDFS-2856: complete inclusion of encryption logic.