Class Protector

java.lang.Object
com.protegrity.ap.java.Protector

public class Protector extends Object
Main entry point for Protegrity data protection operations.

This class provides all methods for protecting, unprotecting, and reprotecting data using Protegrity's Data Protection services. It supports various data types and operations including bulk processing, HMAC generation, and session management.

Supported Operations:

  • Get product version
  • Get last error
  • Protect (including HMAC)
  • Un-protect
  • Re-protect
Since:
1.0.0
Author:
Protegrity
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The hostname for Protegrity Developer Edition API.
    static final String
    The API version.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated.
    As of release 9.0.
    createSession(String policyUser)
    Create a session.
    void
    Note: As the FlushAudits API is an advanced functionality, you must contact the Protegrity Professional Services team for more information about its usage.
    Deprecated.
    Get last error with a description of why the method returned false.
    static Protector
     
    Get product version.
    Returns the extended version of the Product in use.
    boolean
    protect(SessionObject sessionObj, String dataElementName, byte[][] input, byte[][] output, byte[] externalIv, PTYCharset... ptyCharsets)
    Protect byte using all DE supported (Encryption, NoEncryption and DataType Preservation).
    boolean
    protect(SessionObject sessionObj, String dataElementName, byte[][] input, byte[][] output, PTYCharset... ptyCharsets)
    Protect byte using all DE supported (Encryption, NoEncryption and DataType Preservation).
    boolean
    protect(SessionObject sessionObj, String dataElementName, char[][] input, byte[][] output)
    Protect char using encryption data element.
    boolean
    protect(SessionObject sessionObj, String dataElementName, char[][] input, byte[][] output, byte[] externalIv)
    Protect char using encryption data element.
    boolean
    protect(SessionObject sessionObj, String dataElementName, char[][] input, char[][] output)
    Protect char using data type preservation or no encryption data element.
    boolean
    protect(SessionObject sessionObj, String dataElementName, char[][] input, char[][] output, byte[] externalIv)
    Protect char using data type preservation or no encryption data element.
    boolean
    protect(SessionObject sessionObj, String dataElementName, double[] input, byte[][] output)
    Protect double using encryption data element.
    boolean
    protect(SessionObject sessionObj, String dataElementName, double[] input, double[] output)
    Protect double using no encryption data element.
    boolean
    protect(SessionObject sessionObj, String dataElementName, float[] input, byte[][] output)
    Protect float using encryption data element.
    boolean
    protect(SessionObject sessionObj, String dataElementName, float[] input, float[] output)
    Protect float using no encryption data element.
    boolean
    protect(SessionObject sessionObj, String dataElementName, int[] input, byte[][] output)
    Protect int using encryption data element.
    boolean
    protect(SessionObject sessionObj, String dataElementName, int[] input, byte[][] output, byte[] externalIv)
    Protect int using encryption data element.
    boolean
    protect(SessionObject sessionObj, String dataElementName, int[] input, int[] output)
    Protect int using data type preservation or no encryption data element.
    boolean
    protect(SessionObject sessionObj, String dataElementName, int[] input, int[] output, byte[] externalIv)
    Protect int using data type preservation or no encryption data element.
    boolean
    protect(SessionObject sessionObj, String dataElementName, long[] input, byte[][] output)
    Protect long using encryption data element.
    boolean
    protect(SessionObject sessionObj, String dataElementName, long[] input, byte[][] output, byte[] externalIv)
    Protect long using encryption data element.
    boolean
    protect(SessionObject sessionObj, String dataElementName, long[] input, long[] output)
    Protect long using data type preservation or no encryption data element.
    boolean
    protect(SessionObject sessionObj, String dataElementName, long[] input, long[] output, byte[] externalIv)
    Protect long using data type preservation or no encryption data element.
    boolean
    protect(SessionObject sessionObj, String dataElementName, short[] input, byte[][] output)
    Protect short using encryption data element.
    boolean
    protect(SessionObject sessionObj, String dataElementName, short[] input, byte[][] output, byte[] externalIv)
    Protect short using encryption data element.
    boolean
    protect(SessionObject sessionObj, String dataElementName, short[] input, short[] output)
    Protect short using data type preservation or no encryption data element.
    boolean
    protect(SessionObject sessionObj, String dataElementName, short[] input, short[] output, byte[] externalIv)
    Protect short using data type preservation or no encryption data element.
    boolean
    protect(SessionObject sessionObj, String dataElementName, String[] input, byte[][] output)
    Protect String using encryption data element.
    boolean
    protect(SessionObject sessionObj, String dataElementName, String[] input, byte[][] output, byte[] externalIv)
    Protect String using encryption data element.
    boolean
    protect(SessionObject sessionObj, String dataElementName, String[] input, String[] output)
    Protect String using data type preservation or no encryption data element.
    boolean
    protect(SessionObject sessionObj, String dataElementName, String[] input, String[] output, byte[] externalIv)
    Protect String using data type preservation or no encryption data element.
    boolean
    protect(SessionObject sessionObj, String dataElementName, String[] input, String[] output, byte[] externalIv, byte[] externalTweak)
    Protect API supported tweak for FPE(FF1) algo Protect string using only FPE DE supported (Data Type Preservation).
    boolean
    protect(SessionObject sessionObj, String dataElementName, Date[] input, Date[] output)
    Protect java.util.Date using data type preservation.
    boolean
    reprotect(SessionObject sessionObj, String newDataElementName, String oldDataElementName, byte[][] input, byte[][] output, byte[] newExternalIv, byte[] oldExternalIv, PTYCharset... ptyCharsets)
    Reprotect byte using all DE supported (Encryption, NoEncryption and DataType Preservation).
    boolean
    reprotect(SessionObject sessionObj, String newDataElementName, String oldDataElementName, byte[][] input, byte[][] output, PTYCharset... ptyCharsets)
    Reprotect byte using all DE supported (Encryption, NoEncryption and DataType Preservation).
    boolean
    reprotect(SessionObject sessionObj, String newDataElementName, String oldDataElementName, char[][] input, char[][] output)
    Reprotect char using data type preservation or no encryption data element.
    boolean
    reprotect(SessionObject sessionObj, String newDataElementName, String oldDataElementName, char[][] input, char[][] output, byte[] newExternalIv, byte[] oldExternalIv)
    Reprotect char using data type preservation or no encryption data element.
    boolean
    reprotect(SessionObject sessionObj, String newDataElementName, String oldDataElementName, double[] input, double[] output)
    Reprotect double using no encryption data element.
    boolean
    reprotect(SessionObject sessionObj, String newDataElementName, String oldDataElementName, float[] input, float[] output)
    Reprotect float using no encryption data element.
    boolean
    reprotect(SessionObject sessionObj, String newDataElementName, String oldDataElementName, int[] input, int[] output)
    Reprotect int using data type preservation or no encryption data element.
    boolean
    reprotect(SessionObject sessionObj, String newDataElementName, String oldDataElementName, int[] input, int[] output, byte[] newExternalIv, byte[] oldExternalIv)
    Reprotect int using data type preservation or no encryption data element.
    boolean
    reprotect(SessionObject sessionObj, String newDataElementName, String oldDataElementName, long[] input, long[] output)
    Reprotect long using data type preservation or no encryption data element.
    boolean
    reprotect(SessionObject sessionObj, String newDataElementName, String oldDataElementName, long[] input, long[] output, byte[] newExternalIv, byte[] oldExternalIv)
    Reprotect long using data type preservation or no encryption data element.
    boolean
    reprotect(SessionObject sessionObj, String newDataElementName, String oldDataElementName, short[] input, short[] output)
    Reprotect short using data type preservation or no encryption data element.
    boolean
    reprotect(SessionObject sessionObj, String newDataElementName, String oldDataElementName, short[] input, short[] output, byte[] newExternalIv, byte[] oldExternalIv)
    Reprotect short using data type preservation or no encryption data element.
    boolean
    reprotect(SessionObject sessionObj, String newDataElementName, String oldDataElementName, String[] input, String[] output)
    Reprotect String using data type preservation or no encryption data element.
    boolean
    reprotect(SessionObject sessionObj, String newDataElementName, String oldDataElementName, String[] input, String[] output, byte[] newExternalIv, byte[] oldExternalIv)
    Reprotect String using data type preservation or no encryption data element.
    boolean
    reprotect(SessionObject sessionObj, String newDataElementName, String oldDataElementName, String[] input, String[] output, byte[] newExternalIv, byte[] oldExternalIv, byte[] newExternalTweak, byte[] oldExternalTweak)
    Reprotect API supported Tweak for FPE(FF1) Reprotect String using FPE DE supported (DataType Preservation).
    boolean
    reprotect(SessionObject sessionObj, String newDataElementName, String oldDataElementName, Date[] input, Date[] output)
    Reprotect date using data type preservation.
    boolean
    unprotect(SessionObject sessionObj, String dataElementName, byte[][] input, byte[][] output, byte[] externalIv, PTYCharset... ptyCharsets)
    Unprotect byte using all DE supported (Encryption, NoEncryption and DataType Preservation).
    boolean
    unprotect(SessionObject sessionObj, String dataElementName, byte[][] input, byte[][] output, PTYCharset... ptyCharsets)
    Unprotect byte using all DE supported (Encryption, NoEncryption and DataType Preservation).
    boolean
    unprotect(SessionObject sessionObj, String dataElementName, byte[][] input, char[][] output)
    Unprotect char using encryption data element.
    boolean
    unprotect(SessionObject sessionObj, String dataElementName, byte[][] input, char[][] output, byte[] externalIv)
    Unprotect char using encryption data element.
    boolean
    unprotect(SessionObject sessionObj, String dataElementName, byte[][] input, double[] output)
    Unprotect double using encryption data element.
    boolean
    unprotect(SessionObject sessionObj, String dataElementName, byte[][] input, float[] output)
    Unprotect float using encryption data element.
    boolean
    unprotect(SessionObject sessionObj, String dataElementName, byte[][] input, int[] output)
    Unprotect int using encryption data element.
    boolean
    unprotect(SessionObject sessionObj, String dataElementName, byte[][] input, int[] output, byte[] externalIv)
    Unprotect int using encryption data element.
    boolean
    unprotect(SessionObject sessionObj, String dataElementName, byte[][] input, long[] output)
    Unprotect long using encryption data element.
    boolean
    unprotect(SessionObject sessionObj, String dataElementName, byte[][] input, long[] output, byte[] externalIv)
    Unprotect long using encryption data element.
    boolean
    unprotect(SessionObject sessionObj, String dataElementName, byte[][] input, short[] output)
    Unprotect short using encryption data element.
    boolean
    unprotect(SessionObject sessionObj, String dataElementName, byte[][] input, short[] output, byte[] externalIv)
    Unprotect short using encryption data element.
    boolean
    unprotect(SessionObject sessionObj, String dataElementName, byte[][] input, String[] output)
    Unprotect String using encryption data element.
    boolean
    unprotect(SessionObject sessionObj, String dataElementName, byte[][] input, String[] output, byte[] externalIv)
    Unprotect String using encryption data element.
    boolean
    unprotect(SessionObject sessionObj, String dataElementName, char[][] input, char[][] output)
    Unprotect char using data type preservation or no encryption data element.
    boolean
    unprotect(SessionObject sessionObj, String dataElementName, char[][] input, char[][] output, byte[] externalIv)
    Unprotect char using data type preservation or no encryption data element.
    boolean
    unprotect(SessionObject sessionObj, String dataElementName, double[] input, double[] output)
    Unprotect double using no encryption data element.
    boolean
    unprotect(SessionObject sessionObj, String dataElementName, float[] input, float[] output)
    Unprotect float using no encryption data element.
    boolean
    unprotect(SessionObject sessionObj, String dataElementName, int[] input, int[] output)
    Unprotect int using data type preservation or no encryption data element.
    boolean
    unprotect(SessionObject sessionObj, String dataElementName, int[] input, int[] output, byte[] externalIv)
    Unprotect int using data type preservation or no encryption data element.
    boolean
    unprotect(SessionObject sessionObj, String dataElementName, long[] input, long[] output)
    Unprotect long using data type preservation or no encryption data element.
    boolean
    unprotect(SessionObject sessionObj, String dataElementName, long[] input, long[] output, byte[] externalIv)
    Unprotect long using data type preservation or no encryption data element.
    boolean
    unprotect(SessionObject sessionObj, String dataElementName, short[] input, short[] output)
    Unprotect short using data type preservation or no encryption data element.
    boolean
    unprotect(SessionObject sessionObj, String dataElementName, short[] input, short[] output, byte[] externalIv)
    Unprotect short using data type preservation or no encryption data element.
    boolean
    unprotect(SessionObject sessionObj, String dataElementName, String[] input, String[] output)
    Unprotect String using data type preservation or no encryption data element.
    boolean
    unprotect(SessionObject sessionObj, String dataElementName, String[] input, String[] output, byte[] externalIv)
    Unprotect String using data type preservation or no encryption data element.
    boolean
    unprotect(SessionObject sessionObj, String dataElementName, String[] input, String[] output, byte[] externalIv, byte[] externalTweak)
    Unprotect API supports Tweak for FPE(FF1) Unprotect String using FPE DE supported (Data Type Preservation).
    boolean
    unprotect(SessionObject sessionObj, String dataElementName, Date[] input, Date[] output)
    Unprotect java.util.Date using data type preservation.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Method Details

    • getProtector

      public static Protector getProtector() throws ProtectorException
      Throws:
      ProtectorException
    • getVersion

      public String getVersion()
      Get product version.
      Returns:
      String The version
    • getVersionEx

      public String getVersionEx()
      Returns the extended version of the Product in use.

      The extended version consists of Product version number and Core version number. Core version number can be communicated to the Protegrity Support while troubleshooting AP Java related issues.

      Returns:
      String Product and the Core version
    • getCoreVersion

      @Deprecated public String getCoreVersion()
      Deprecated.
      Returns the Protectors' core version. Core version will be useful during debugging Protector issues. It is only applicable for Protector version 8.1 or above.
      Returns:
      String core version used in the Protector
    • getLastError

      public String getLastError(SessionObject session) throws ProtectorException, SessionTimeoutException
      Get last error with a description of why the method returned false. (example "The username could not be found in the policy. in shared memory." ).
      Parameters:
      session - The session
      Returns:
      String The error message
      Throws:
      ProtectorException - When input is null
      SessionTimeoutException - When session has expired or is invalid.
    • createSession

      public SessionObject createSession(String policyUser) throws ProtectorException
      Create a session. Sessions that are not utilized are automatically removed.
      Parameters:
      policyUser - String containing the user name defined in policy
      Returns:
      SessionObject The session
      Throws:
      ProtectorException - When input is empty or null
    • closeSession

      @Deprecated public void closeSession(SessionObject session) throws ProtectorException
      Deprecated.
      As of release 9.0.
      Close session. Use this method with caution since you do not want to create too many audit records.
      Parameters:
      session - Obtained by calling createSession method
      Throws:
      ProtectorException - When input is empty or null
    • protect

      public boolean protect(SessionObject sessionObj, String dataElementName, short[] input, short[] output) throws ProtectorException, SessionTimeoutException
      Protect short using data type preservation or no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy name defined in policy
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • protect

      public boolean protect(SessionObject sessionObj, String dataElementName, short[] input, byte[][] output) throws ProtectorException, SessionTimeoutException
      Protect short using encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy name defined in policy
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • protect

      public boolean protect(SessionObject sessionObj, String dataElementName, short[] input, short[] output, byte[] externalIv) throws ProtectorException, SessionTimeoutException
      Protect short using data type preservation or no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      externalIv - Buffer containing data that will be used as external IV, when externalIv = null the value is ignored, when externalIv = null the value is ignored
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • protect

      public boolean protect(SessionObject sessionObj, String dataElementName, short[] input, byte[][] output, byte[] externalIv) throws ProtectorException, SessionTimeoutException
      Protect short using encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      externalIv - Buffer containing data that will be used as external IV, when externalIv = null the value is ignored
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • protect

      public boolean protect(SessionObject sessionObj, String dataElementName, int[] input, int[] output) throws ProtectorException, SessionTimeoutException
      Protect int using data type preservation or no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy name defined in policy
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • protect

      public boolean protect(SessionObject sessionObj, String dataElementName, int[] input, byte[][] output) throws ProtectorException, SessionTimeoutException
      Protect int using encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy name defined in policy
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • protect

      public boolean protect(SessionObject sessionObj, String dataElementName, int[] input, int[] output, byte[] externalIv) throws ProtectorException, SessionTimeoutException
      Protect int using data type preservation or no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      externalIv - Buffer containing data that will be used as external IV, when externalIv = null the value is ignored
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • protect

      public boolean protect(SessionObject sessionObj, String dataElementName, int[] input, byte[][] output, byte[] externalIv) throws ProtectorException, SessionTimeoutException
      Protect int using encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      externalIv - Buffer containing data that will be used as external IV, when externalIv = null the value is ignored
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • protect

      public boolean protect(SessionObject sessionObj, String dataElementName, long[] input, long[] output) throws ProtectorException, SessionTimeoutException
      Protect long using data type preservation or no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy name defined in policy
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • protect

      public boolean protect(SessionObject sessionObj, String dataElementName, long[] input, byte[][] output) throws ProtectorException, SessionTimeoutException
      Protect long using encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy name defined in policy
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • protect

      public boolean protect(SessionObject sessionObj, String dataElementName, long[] input, long[] output, byte[] externalIv) throws ProtectorException, SessionTimeoutException
      Protect long using data type preservation or no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      externalIv - Buffer containing data that will be used as external IV, when externalIv = null the value is ignored
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • protect

      public boolean protect(SessionObject sessionObj, String dataElementName, long[] input, byte[][] output, byte[] externalIv) throws ProtectorException, SessionTimeoutException
      Protect long using encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      externalIv - Buffer containing data that will be used as external IV, when externalIv = null the value is ignored
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • protect

      public boolean protect(SessionObject sessionObj, String dataElementName, float[] input, float[] output) throws ProtectorException, SessionTimeoutException
      Protect float using no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • protect

      public boolean protect(SessionObject sessionObj, String dataElementName, float[] input, byte[][] output) throws ProtectorException, SessionTimeoutException
      Protect float using encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • protect

      public boolean protect(SessionObject sessionObj, String dataElementName, double[] input, double[] output) throws ProtectorException, SessionTimeoutException
      Protect double using no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • protect

      public boolean protect(SessionObject sessionObj, String dataElementName, double[] input, byte[][] output) throws ProtectorException, SessionTimeoutException
      Protect double using encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • protect

      public boolean protect(SessionObject sessionObj, String dataElementName, Date[] input, Date[] output) throws ProtectorException, SessionTimeoutException
      Protect java.util.Date using data type preservation.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • protect

      public boolean protect(SessionObject sessionObj, String dataElementName, String[] input, String[] output) throws ProtectorException, SessionTimeoutException
      Protect String using data type preservation or no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • protect

      public boolean protect(SessionObject sessionObj, String dataElementName, String[] input, byte[][] output) throws ProtectorException, SessionTimeoutException
      Protect String using encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • protect

      public boolean protect(SessionObject sessionObj, String dataElementName, String[] input, String[] output, byte[] externalIv) throws ProtectorException, SessionTimeoutException
      Protect String using data type preservation or no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      externalIv - Buffer containing data that will be used as external IV, when externalIv = null the value is ignored
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • protect

      public boolean protect(SessionObject sessionObj, String dataElementName, String[] input, byte[][] output, byte[] externalIv) throws ProtectorException, SessionTimeoutException
      Protect String using encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      externalIv - Buffer containing data that will be used as external IV, when externalIv = null the value is ignored
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • protect

      public boolean protect(SessionObject sessionObj, String dataElementName, char[][] input, char[][] output) throws ProtectorException, SessionTimeoutException
      Protect char using data type preservation or no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • protect

      public boolean protect(SessionObject sessionObj, String dataElementName, char[][] input, byte[][] output) throws ProtectorException, SessionTimeoutException
      Protect char using encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • protect

      public boolean protect(SessionObject sessionObj, String dataElementName, char[][] input, char[][] output, byte[] externalIv) throws ProtectorException, SessionTimeoutException
      Protect char using data type preservation or no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      externalIv - Buffer containing data that will be used as external IV, when externalIv = null the value is ignored
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • protect

      public boolean protect(SessionObject sessionObj, String dataElementName, char[][] input, byte[][] output, byte[] externalIv) throws ProtectorException, SessionTimeoutException
      Protect char using encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      externalIv - Buffer containing data that will be used as external IV, when externalIv = null the value is ignored
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • protect

      public boolean protect(SessionObject sessionObj, String dataElementName, byte[][] input, byte[][] output, PTYCharset... ptyCharsets) throws ProtectorException, SessionTimeoutException
      Protect byte using all DE supported (Encryption, NoEncryption and DataType Preservation).
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      ptyCharsets - Charset that will used to understand byte encoding
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • protect

      public boolean protect(SessionObject sessionObj, String dataElementName, byte[][] input, byte[][] output, byte[] externalIv, PTYCharset... ptyCharsets) throws ProtectorException, SessionTimeoutException
      Protect byte using all DE supported (Encryption, NoEncryption and DataType Preservation).
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      externalIv - Buffer containing data that will be used as external IV, when externalIv = null the value is ignored
      ptyCharsets - Charset that will used to understand byte encoding
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • protect

      public boolean protect(SessionObject sessionObj, String dataElementName, String[] input, String[] output, byte[] externalIv, byte[] externalTweak) throws ProtectorException, SessionTimeoutException
      Protect API supported tweak for FPE(FF1) algo Protect string using only FPE DE supported (Data Type Preservation).
      Parameters:
      sessionObj - Obtained by Calling createSession method
      dataElementName - String conatining the data element name defined in policy
      input - Input array
      output - Result output array
      externalIv - Buffer conatining data that will be used as external IV, when externalIv = null the value is ignored.
      externalTweak - Buffer conatining data that will be used as Tweak, when externalTweak = null the value is take as 0.
      Returns:
      boolean If the operation is sucessful
      Throws:
      ProtectorException - when input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • unprotect

      public boolean unprotect(SessionObject sessionObj, String dataElementName, short[] input, short[] output) throws ProtectorException, SessionTimeoutException
      Unprotect short using data type preservation or no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • unprotect

      public boolean unprotect(SessionObject sessionObj, String dataElementName, byte[][] input, short[] output) throws ProtectorException, SessionTimeoutException
      Unprotect short using encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • unprotect

      public boolean unprotect(SessionObject sessionObj, String dataElementName, short[] input, short[] output, byte[] externalIv) throws ProtectorException, SessionTimeoutException
      Unprotect short using data type preservation or no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      externalIv - Buffer containing data that will be used as external IV, when externalIv = null the value is ignored
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • unprotect

      public boolean unprotect(SessionObject sessionObj, String dataElementName, byte[][] input, short[] output, byte[] externalIv) throws ProtectorException, SessionTimeoutException
      Unprotect short using encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      externalIv - Buffer containing data that will be used as external IV, when externalIv = null the value is ignored
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • unprotect

      public boolean unprotect(SessionObject sessionObj, String dataElementName, int[] input, int[] output) throws ProtectorException, SessionTimeoutException
      Unprotect int using data type preservation or no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • unprotect

      public boolean unprotect(SessionObject sessionObj, String dataElementName, byte[][] input, int[] output) throws ProtectorException, SessionTimeoutException
      Unprotect int using encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • unprotect

      public boolean unprotect(SessionObject sessionObj, String dataElementName, int[] input, int[] output, byte[] externalIv) throws ProtectorException, SessionTimeoutException
      Unprotect int using data type preservation or no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      externalIv - Buffer containing data that will be used as external IV, when externalIv = null the value is ignored
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • unprotect

      public boolean unprotect(SessionObject sessionObj, String dataElementName, byte[][] input, int[] output, byte[] externalIv) throws ProtectorException, SessionTimeoutException
      Unprotect int using encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      externalIv - Buffer containing data that will be used as external IV, when externalIv = null the value is ignored
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • unprotect

      public boolean unprotect(SessionObject sessionObj, String dataElementName, long[] input, long[] output) throws ProtectorException, SessionTimeoutException
      Unprotect long using data type preservation or no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • unprotect

      public boolean unprotect(SessionObject sessionObj, String dataElementName, byte[][] input, long[] output) throws ProtectorException, SessionTimeoutException
      Unprotect long using encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • unprotect

      public boolean unprotect(SessionObject sessionObj, String dataElementName, long[] input, long[] output, byte[] externalIv) throws ProtectorException, SessionTimeoutException
      Unprotect long using data type preservation or no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      externalIv - Buffer containing data that will be used as external IV, when externalIv = null the value is ignored
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • unprotect

      public boolean unprotect(SessionObject sessionObj, String dataElementName, byte[][] input, long[] output, byte[] externalIv) throws ProtectorException, SessionTimeoutException
      Unprotect long using encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      externalIv - Buffer containing data that will be used as external IV, when externalIv = null the value is ignored
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • unprotect

      public boolean unprotect(SessionObject sessionObj, String dataElementName, float[] input, float[] output) throws ProtectorException, SessionTimeoutException
      Unprotect float using no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • unprotect

      public boolean unprotect(SessionObject sessionObj, String dataElementName, byte[][] input, float[] output) throws ProtectorException, SessionTimeoutException
      Unprotect float using encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • unprotect

      public boolean unprotect(SessionObject sessionObj, String dataElementName, double[] input, double[] output) throws ProtectorException, SessionTimeoutException
      Unprotect double using no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • unprotect

      public boolean unprotect(SessionObject sessionObj, String dataElementName, byte[][] input, double[] output) throws ProtectorException, SessionTimeoutException
      Unprotect double using encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • unprotect

      public boolean unprotect(SessionObject sessionObj, String dataElementName, Date[] input, Date[] output) throws ProtectorException, SessionTimeoutException
      Unprotect java.util.Date using data type preservation.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • unprotect

      public boolean unprotect(SessionObject sessionObj, String dataElementName, String[] input, String[] output) throws ProtectorException, SessionTimeoutException
      Unprotect String using data type preservation or no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • unprotect

      public boolean unprotect(SessionObject sessionObj, String dataElementName, byte[][] input, String[] output) throws ProtectorException, SessionTimeoutException
      Unprotect String using encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • unprotect

      public boolean unprotect(SessionObject sessionObj, String dataElementName, String[] input, String[] output, byte[] externalIv) throws ProtectorException, SessionTimeoutException
      Unprotect String using data type preservation or no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      externalIv - Buffer containing data that will be used as external IV, when externalIv = null the value is ignored
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • unprotect

      public boolean unprotect(SessionObject sessionObj, String dataElementName, byte[][] input, String[] output, byte[] externalIv) throws ProtectorException, SessionTimeoutException
      Unprotect String using encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      externalIv - Buffer containing data that will be used as external IV, when externalIv = null the value is ignored
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • unprotect

      public boolean unprotect(SessionObject sessionObj, String dataElementName, char[][] input, char[][] output) throws ProtectorException, SessionTimeoutException
      Unprotect char using data type preservation or no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • unprotect

      public boolean unprotect(SessionObject sessionObj, String dataElementName, byte[][] input, char[][] output) throws ProtectorException, SessionTimeoutException
      Unprotect char using encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • unprotect

      public boolean unprotect(SessionObject sessionObj, String dataElementName, char[][] input, char[][] output, byte[] externalIv) throws ProtectorException, SessionTimeoutException
      Unprotect char using data type preservation or no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      externalIv - Buffer containing data that will be used as external IV, when externalIv = null the value is ignored
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • unprotect

      public boolean unprotect(SessionObject sessionObj, String dataElementName, byte[][] input, char[][] output, byte[] externalIv) throws ProtectorException, SessionTimeoutException
      Unprotect char using encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      externalIv - Buffer containing data that will be used as external IV, when externalIv = null the value is ignored
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • unprotect

      public boolean unprotect(SessionObject sessionObj, String dataElementName, byte[][] input, byte[][] output, PTYCharset... ptyCharsets) throws ProtectorException, SessionTimeoutException, SessionTimeoutException
      Unprotect byte using all DE supported (Encryption, NoEncryption and DataType Preservation).
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      ptyCharsets - Charset that will used to understand byte encoding
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
      SessionTimeoutException - When session is invalid or has timedout
    • unprotect

      public boolean unprotect(SessionObject sessionObj, String dataElementName, byte[][] input, byte[][] output, byte[] externalIv, PTYCharset... ptyCharsets) throws ProtectorException, SessionTimeoutException
      Unprotect byte using all DE supported (Encryption, NoEncryption and DataType Preservation).
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      externalIv - Buffer containing data that will be used as external IV, when externalIv = null the value is ignored
      ptyCharsets - Charset that will used to understand byte encoding
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • unprotect

      public boolean unprotect(SessionObject sessionObj, String dataElementName, String[] input, String[] output, byte[] externalIv, byte[] externalTweak) throws ProtectorException, SessionTimeoutException
      Unprotect API supports Tweak for FPE(FF1) Unprotect String using FPE DE supported (Data Type Preservation).
      Parameters:
      sessionObj - Obtained by calling createSession method
      dataElementName - String containing the data element name defined in policy
      input - Input array
      output - Result output array
      externalIv - Buffer containing data that will be used as external IV, when externalIv = null the value is ignored
      externalTweak - Buffer conatining data that will be used as externalTweak, when externalTweak = null the balue is 0.
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • reprotect

      public boolean reprotect(SessionObject sessionObj, String newDataElementName, String oldDataElementName, short[] input, short[] output) throws ProtectorException, SessionTimeoutException
      Reprotect short using data type preservation or no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      newDataElementName - String containing the data element name defined in policy used to create the output data
      oldDataElementName - String containing the data element name defined in policy for the input data
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • reprotect

      public boolean reprotect(SessionObject sessionObj, String newDataElementName, String oldDataElementName, short[] input, short[] output, byte[] newExternalIv, byte[] oldExternalIv) throws ProtectorException, SessionTimeoutException
      Reprotect short using data type preservation or no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      newDataElementName - String containing the data element name defined in policy used to create the output data
      oldDataElementName - String containing the data element name defined in policy for the input data
      input - Input array
      output - Result output array
      newExternalIv - Buffer containing data that will be used as external IV on new data element, when newExternalIv = null the value is ignored
      oldExternalIv - Buffer containing data that will be used as external IV on old data element, when oldExternalIv = null the value is ignored
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • reprotect

      public boolean reprotect(SessionObject sessionObj, String newDataElementName, String oldDataElementName, int[] input, int[] output) throws ProtectorException, SessionTimeoutException
      Reprotect int using data type preservation or no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      newDataElementName - String containing the data element name defined in policy used to create the output data
      oldDataElementName - String containing the data element name defined in policy for the input data
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • reprotect

      public boolean reprotect(SessionObject sessionObj, String newDataElementName, String oldDataElementName, int[] input, int[] output, byte[] newExternalIv, byte[] oldExternalIv) throws ProtectorException, SessionTimeoutException
      Reprotect int using data type preservation or no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      newDataElementName - String containing the data element name defined in policy used to create the output data
      oldDataElementName - String containing the data element name defined in policy for the input data
      input - Input array
      output - Result output array
      newExternalIv - Buffer containing data that will be used as external IV on new data element, when newExternalIv = null the value is ignored
      oldExternalIv - Buffer containing data that will be used as external IV on old data element, when oldExternalIv = null the value is ignored
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • reprotect

      public boolean reprotect(SessionObject sessionObj, String newDataElementName, String oldDataElementName, long[] input, long[] output) throws ProtectorException, SessionTimeoutException
      Reprotect long using data type preservation or no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      newDataElementName - String containing the data element name defined in policy used to create the output data
      oldDataElementName - String containing the data element name defined in policy for the input data
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • reprotect

      public boolean reprotect(SessionObject sessionObj, String newDataElementName, String oldDataElementName, long[] input, long[] output, byte[] newExternalIv, byte[] oldExternalIv) throws ProtectorException, SessionTimeoutException
      Reprotect long using data type preservation or no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      newDataElementName - String containing the data element name defined in policy used to create the output data
      oldDataElementName - String containing the data element name defined in policy for the input data
      input - Input array
      output - Result output array
      newExternalIv - Buffer containing data that will be used as external IV on new data element, when newExternalIv = null the value is ignored
      oldExternalIv - Buffer containing data that will be used as external IV on old data element, when oldExternalIv = null the value is ignored
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • reprotect

      public boolean reprotect(SessionObject sessionObj, String newDataElementName, String oldDataElementName, float[] input, float[] output) throws ProtectorException, SessionTimeoutException
      Reprotect float using no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      newDataElementName - String containing the data element name defined in policy used to create the output data
      oldDataElementName - String containing the data element name defined in policy for the input data
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • reprotect

      public boolean reprotect(SessionObject sessionObj, String newDataElementName, String oldDataElementName, double[] input, double[] output) throws ProtectorException, SessionTimeoutException
      Reprotect double using no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      newDataElementName - String containing the data element name defined in policy used to create the output data
      oldDataElementName - String containing the data element name defined in policy for the input data
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • reprotect

      public boolean reprotect(SessionObject sessionObj, String newDataElementName, String oldDataElementName, Date[] input, Date[] output) throws ProtectorException, SessionTimeoutException
      Reprotect date using data type preservation.
      Parameters:
      sessionObj - Obtained by calling createSession method
      newDataElementName - String containing the data element name defined in policy used to create the output data
      oldDataElementName - String containing the data element name defined in policy for the input data
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • reprotect

      public boolean reprotect(SessionObject sessionObj, String newDataElementName, String oldDataElementName, String[] input, String[] output) throws ProtectorException, SessionTimeoutException
      Reprotect String using data type preservation or no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      newDataElementName - String containing the data element name defined in policy used to create the output data
      oldDataElementName - String containing the data element name defined in policy for the input data
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • reprotect

      public boolean reprotect(SessionObject sessionObj, String newDataElementName, String oldDataElementName, String[] input, String[] output, byte[] newExternalIv, byte[] oldExternalIv) throws ProtectorException, SessionTimeoutException
      Reprotect String using data type preservation or no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      newDataElementName - String containing the data element name defined in policy used to create the output data
      oldDataElementName - String containing the data element name defined in policy for the input data
      input - Input array
      output - Result output array
      newExternalIv - Buffer containing data that will be used as external IV on new data element, when newExternalIv = null the value is ignored
      oldExternalIv - Buffer containing data that will be used as external IV on old data element, when oldExternalIv = null the value is ignored
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • reprotect

      public boolean reprotect(SessionObject sessionObj, String newDataElementName, String oldDataElementName, char[][] input, char[][] output) throws ProtectorException, SessionTimeoutException
      Reprotect char using data type preservation or no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      newDataElementName - String containing the data element name defined in policy used to create the output data
      oldDataElementName - String containing the data element name defined in policy for the input data
      input - Input array
      output - Result output array
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • reprotect

      public boolean reprotect(SessionObject sessionObj, String newDataElementName, String oldDataElementName, char[][] input, char[][] output, byte[] newExternalIv, byte[] oldExternalIv) throws ProtectorException, SessionTimeoutException
      Reprotect char using data type preservation or no encryption data element.
      Parameters:
      sessionObj - Obtained by calling createSession method
      newDataElementName - String containing the data element name defined in policy used to create the output data
      oldDataElementName - String containing the data element name defined in policy for the input data
      input - Input array
      output - Result output array
      newExternalIv - Buffer containing data that will be used as external IV on new data element, when newExternalIv = null the value is ignored
      oldExternalIv - Buffer containing data that will be used as external IV on old data element, when oldExternalIv = null the value is ignored
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • reprotect

      public boolean reprotect(SessionObject sessionObj, String newDataElementName, String oldDataElementName, byte[][] input, byte[][] output, PTYCharset... ptyCharsets) throws ProtectorException, SessionTimeoutException
      Reprotect byte using all DE supported (Encryption, NoEncryption and DataType Preservation).
      Parameters:
      sessionObj - Obtained by calling createSession method
      newDataElementName - String containing the data element name defined in policy used to create the output data
      oldDataElementName - String containing the data element name defined in policy for the input data
      input - Input array
      output - Result output array
      ptyCharsets - Charset that will used to understand byte encoding
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • reprotect

      public boolean reprotect(SessionObject sessionObj, String newDataElementName, String oldDataElementName, byte[][] input, byte[][] output, byte[] newExternalIv, byte[] oldExternalIv, PTYCharset... ptyCharsets) throws ProtectorException, SessionTimeoutException
      Reprotect byte using all DE supported (Encryption, NoEncryption and DataType Preservation).
      Parameters:
      sessionObj - Obtained by calling createSession method
      newDataElementName - String containing the data element name defined in policy used to create the output data
      oldDataElementName - String containing the data element name defined in policy for the input data
      input - Input array
      output - Result output array
      newExternalIv - Buffer containing data that will be used as external IV on new data element, when newExternalIv = null the value is ignored
      oldExternalIv - Buffer containing data that will be used as external IV on old data element, when oldExternalIv = null the value is ignored
      ptyCharsets - Charset that will used to understand byte encoding
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • reprotect

      public boolean reprotect(SessionObject sessionObj, String newDataElementName, String oldDataElementName, String[] input, String[] output, byte[] newExternalIv, byte[] oldExternalIv, byte[] newExternalTweak, byte[] oldExternalTweak) throws ProtectorException, SessionTimeoutException
      Reprotect API supported Tweak for FPE(FF1) Reprotect String using FPE DE supported (DataType Preservation).
      Parameters:
      sessionObj - Obtained by calling createSession method
      newDataElementName - String containing the data element name defined in policy used to create the output data
      oldDataElementName - String containing the data element name defined in policy for the input data
      input - Input array
      output - Result output array
      newExternalIv - Buffer containing data that will be used as external IV on new data element, when newExternalIv = null the value is ignored
      oldExternalIv - Buffer containing data that will be used as external IV on old data element, when oldExternalIv = null the value is ignored
      newExternalTweak - Buffer conatining data that will be used as external Tweak on new data element.
      oldExternalTweak - Buffer conatining data that will be used as external Tweak on old data element.
      Returns:
      boolean If the operation is successful
      Throws:
      ProtectorException - When input is empty, null or when the policy is configured that way.
      SessionTimeoutException - When session has expired or is invalid.
    • flushAudits

      public void flushAudits() throws ProtectorException
      Note: As the FlushAudits API is an advanced functionality, you must contact the Protegrity Professional Services team for more information about its usage.
      Throws:
      ProtectorException - When configuration is invalid.