Class OpensslCtrCryptoCodec

java.lang.Object
org.apache.hadoop.crypto.CryptoCodec
org.apache.hadoop.crypto.OpensslCtrCryptoCodec
All Implemented Interfaces:
Closeable, AutoCloseable, Configurable
Direct Known Subclasses:
OpensslAesCtrCryptoCodec, OpensslSm4CtrCryptoCodec

@Private @Evolving public abstract class OpensslCtrCryptoCodec extends CryptoCodec
  • Constructor Details

    • OpensslCtrCryptoCodec

      public OpensslCtrCryptoCodec()
  • Method Details

    • getEngineId

      public String getEngineId()
    • setEngineId

      public void setEngineId(String engineId)
    • getRandom

      public Random getRandom()
    • setRandom

      public void setRandom(Random random)
    • calculateIV

      public void calculateIV(byte[] initIV, long counter, byte[] iv, int blockSize)
    • getLogger

      protected abstract org.slf4j.Logger getLogger()
    • setConf

      public void setConf(Configuration conf)
      Description copied from interface: Configurable
      Set the configuration to be used by this object.
      Parameters:
      conf - configuration to be used
    • getConf

      public Configuration getConf()
      Description copied from interface: Configurable
      Return the configuration used by this object.
      Returns:
      Configuration
    • generateSecureRandom

      public void generateSecureRandom(byte[] bytes)
      Description copied from class: CryptoCodec
      Generate a number of secure, random bytes suitable for cryptographic use. This method needs to be thread-safe.
      Specified by:
      generateSecureRandom in class CryptoCodec
      Parameters:
      bytes - byte array to populate with random data
    • close

      public void close() throws IOException
      Throws:
      IOException