All Known Subinterfaces:
GordianKeyedCipher<T>, GordianKeySetAADCipher, GordianKeySetCipher, GordianStreamAEADCipher, GordianStreamCipher, GordianSymAEADCipher, GordianSymCipher

public interface GordianCipher
GordianKnot base for Cipher.
  • Method Summary

    Modifier and Type
    Method
    Description
    default byte[]
    Complete the Cipher operation and return final results.
    default byte[]
    finish(byte[] pBytes)
    Process the passed data and return final results.
    int
    finish(byte[] pOutput, int pOutOffset)
    Complete the Cipher operation and return final results.
    default byte[]
    finish(byte[] pBytes, int pOffset, int pLength)
    Process the passed data and return final results.
    default int
    finish(byte[] pBytes, int pOffset, int pLength, byte[] pOutput)
    Process the passed data and return final results.
    default int
    finish(byte[] pBytes, int pOffset, int pLength, byte[] pOutput, int pOutOffset)
    Process the passed data and return final results.
    int
    getOutputLength(int pLength)
    Determine the maximum number of output bytes that will be produced for the given number of input bytes.
    default byte[]
    update(byte[] pBytes)
    Process the passed data and return intermediate results.
    default byte[]
    update(byte[] pBytes, int pOffset, int pLength)
    Process the passed data and return intermediate results.
    default int
    update(byte[] pBytes, int pOffset, int pLength, byte[] pOutput)
    Process the passed data and return intermediate results.
    int
    update(byte[] pBytes, int pOffset, int pLength, byte[] pOutput, int pOutOffset)
    Process the passed data and return intermediate results.
  • Method Details

    • getOutputLength

      int getOutputLength(int pLength)
      Determine the maximum number of output bytes that will be produced for the given number of input bytes.
      Parameters:
      pLength - the number of input bytes
      Returns:
      # of output bytes
    • update

      default byte[] update(byte[] pBytes) throws GordianException
      Process the passed data and return intermediate results.
      Parameters:
      pBytes - Bytes to update cipher with
      Returns:
      the intermediate processed data
      Throws:
      GordianException - on error
    • update

      default byte[] update(byte[] pBytes, int pOffset, int pLength) throws GordianException
      Process the passed data and return intermediate results.
      Parameters:
      pBytes - Bytes to update cipher with
      pOffset - offset within pBytes to read bytes from
      pLength - length of data to update with
      Returns:
      the intermediate processed data
      Throws:
      GordianException - on error
    • update

      default int update(byte[] pBytes, int pOffset, int pLength, byte[] pOutput) throws GordianException
      Process the passed data and return intermediate results.
      Parameters:
      pBytes - Bytes to update cipher with
      pOffset - offset within pBytes to read bytes from
      pLength - length of data to update with
      pOutput - the output buffer to receive processed data
      Returns:
      the number of bytes transferred to the output buffer
      Throws:
      GordianException - on error
    • update

      int update(byte[] pBytes, int pOffset, int pLength, byte[] pOutput, int pOutOffset) throws GordianException
      Process the passed data and return intermediate results.
      Parameters:
      pBytes - Bytes to update cipher with
      pOffset - offset within pBytes to read bytes from
      pLength - length of data to update with
      pOutput - the output buffer to receive processed data
      pOutOffset - offset within pOutput to write bytes to
      Returns:
      the number of bytes transferred to the output buffer
      Throws:
      GordianException - on error
    • finish

      default byte[] finish() throws GordianException
      Complete the Cipher operation and return final results.
      Returns:
      the remaining processed data
      Throws:
      GordianException - on error
    • finish

      default byte[] finish(byte[] pBytes) throws GordianException
      Process the passed data and return final results.
      Parameters:
      pBytes - Bytes to update cipher with
      Returns:
      the remaining processed data
      Throws:
      GordianException - on error
    • finish

      default byte[] finish(byte[] pBytes, int pOffset, int pLength) throws GordianException
      Process the passed data and return final results.
      Parameters:
      pBytes - Bytes to update cipher with
      pOffset - offset within pBytes to read bytes from
      pLength - length of data to update with
      Returns:
      the remaining processed data
      Throws:
      GordianException - on error
    • finish

      default int finish(byte[] pBytes, int pOffset, int pLength, byte[] pOutput) throws GordianException
      Process the passed data and return final results.
      Parameters:
      pBytes - Bytes to update cipher with
      pOffset - offset within pBytes to read bytes from
      pLength - length of data to update with
      pOutput - the output buffer to receive processed data
      Returns:
      the number of bytes transferred to the output buffer
      Throws:
      GordianException - on error
    • finish

      default int finish(byte[] pBytes, int pOffset, int pLength, byte[] pOutput, int pOutOffset) throws GordianException
      Process the passed data and return final results.
      Parameters:
      pBytes - Bytes to update cipher with
      pOffset - offset within pBytes to read bytes from
      pLength - length of data to update with
      pOutput - the output buffer to receive processed data
      pOutOffset - offset within pOutput to write bytes to
      Returns:
      the number of bytes transferred to the output buffer
      Throws:
      GordianException - on error
    • finish

      int finish(byte[] pOutput, int pOutOffset) throws GordianException
      Complete the Cipher operation and return final results.
      Parameters:
      pOutput - the output buffer to receive processed data
      pOutOffset - offset within pOutput to write bytes to
      Returns:
      the number of bytes transferred to the output buffer
      Throws:
      GordianException - on error