SHA256MaskFactory (ORC Core 1.6.5 API)
Date: 2020-10-01

org.apache.orc.impl.mask

## Class SHA256MaskFactory

- java.lang.Object
- - org.apache.orc.impl.mask.MaskFactory
  - - org.apache.orc.impl.mask.SHA256MaskFactory

-     public class SHA256MaskFactory
      extends MaskFactory

  Masking strategy that masks String, Varchar, Char and Binary types as SHA 256 hash.

  For String type: All string type of any length will be converted to 64 character length SHA256 hash encoded in hexadecimal.

  For Varchar type: For Varchar type, max-length property will be honored i.e. if the length is less than max-length then the SHA256 hash will be truncated to max-length. If max-length is greater than 64 then the output is the sha256 length, which is 64.

  For Char type: For Char type, the length of mask will always be equal to specified max-length. If the given length (max-length) is less than SHA256 hash length (64) the mask will be truncated. If the given length (max-length) is greater than SHA256 hash length (64) then the mask will be padded by blank spaces.

  For Binary type: All Binary type of any length will be converted to 32 byte length SHA256 hash.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected DataMask` | `buildBinaryMask(TypeDescription schema)`
    `protected DataMask` | `buildBooleanMask(TypeDescription schema)`
    `protected DataMask` | `buildDateMask(TypeDescription schema)`
    `protected DataMask` | `buildDecimalMask(TypeDescription schema)`
    `protected DataMask` | `buildDoubleMask(TypeDescription schema)`
    `protected DataMask` | `buildLongMask(TypeDescription schema)`
    `protected DataMask` | `buildStringMask(TypeDescription schema)`
    `protected DataMask` | `buildTimestampMask(TypeDescription schema)`

    - ### Methods inherited from class org.apache.orc.impl.mask.MaskFactory

      `build, buildChildren, buildStructMask`

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

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

- - ### Method Detail

    - #### buildBinaryMask

          protected DataMask buildBinaryMask(TypeDescription schema)

      Specified by:
        `buildBinaryMask` in class `MaskFactory`

    - #### buildBooleanMask

          protected DataMask buildBooleanMask(TypeDescription schema)

      Specified by:
        `buildBooleanMask` in class `MaskFactory`

    - #### buildLongMask

          protected DataMask buildLongMask(TypeDescription schema)

      Specified by:
        `buildLongMask` in class `MaskFactory`

    - #### buildDecimalMask

          protected DataMask buildDecimalMask(TypeDescription schema)

      Specified by:
        `buildDecimalMask` in class `MaskFactory`

    - #### buildDoubleMask

          protected DataMask buildDoubleMask(TypeDescription schema)

      Specified by:
        `buildDoubleMask` in class `MaskFactory`

    - #### buildStringMask

          protected DataMask buildStringMask(TypeDescription schema)

      Specified by:
        `buildStringMask` in class `MaskFactory`

    - #### buildDateMask

          protected DataMask buildDateMask(TypeDescription schema)

      Specified by:
        `buildDateMask` in class `MaskFactory`

    - #### buildTimestampMask

          protected DataMask buildTimestampMask(TypeDescription schema)

      Specified by:
        `buildTimestampMask` in class `MaskFactory`

Copyright © 2013–2020 The Apache Software Foundation. All rights reserved.