OpensslCtrCryptoCodec (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.crypto, class: OpensslCtrCryptoCodec

Package org.apache.hadoop.crypto

# 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

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `protected static class`
  `OpensslCtrCryptoCodec.OpensslCtrCipher`

- ## Field Summary

  ### Fields inherited from class org.apache.hadoop.crypto.CryptoCodec

  `LOG`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OpensslCtrCryptoCodec()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `calculateIV(byte[] initIV, long counter, byte[] iv, int blockSize)`
  `void`
  `close()`
  `void`
  `generateSecureRandom(byte[] bytes)`
  Generate a number of secure, random bytes suitable for cryptographic use.
  `Configuration`
  `getConf()`
  Return the configuration used by this object.
  `String`
  `getEngineId()`
  `protected abstract org.slf4j.Logger`
  `getLogger()`
  `Random`
  `getRandom()`
  `void`
  `setConf(Configuration conf)`
  Set the configuration to be used by this object.
  `void`
  `setEngineId(String engineId)`
  `void`
  `setRandom(Random random)`

  ### Methods inherited from class org.apache.hadoop.crypto.CryptoCodec

  `calculateIV, createDecryptor, createEncryptor, getCipherSuite, getInstance, getInstance`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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`