Interface GordianCipher
- All Known Subinterfaces:
GordianKeyedCipher<T>,GordianKeySetAADCipher,GordianKeySetCipher,GordianStreamAEADCipher,GordianStreamCipher,GordianSymAEADCipher,GordianSymCipher
public interface GordianCipher
GordianKnot base for Cipher.
-
Method Summary
Modifier and TypeMethodDescriptiondefault byte[]finish()Complete the Cipher operation and return final results.default byte[]finish(byte[] pBytes) Process the passed data and return final results.intfinish(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 intfinish(byte[] pBytes, int pOffset, int pLength, byte[] pOutput) Process the passed data and return final results.default intfinish(byte[] pBytes, int pOffset, int pLength, byte[] pOutput, int pOutOffset) Process the passed data and return final results.intgetOutputLength(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 intupdate(byte[] pBytes, int pOffset, int pLength, byte[] pOutput) Process the passed data and return intermediate results.intupdate(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
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
Process the passed data and return intermediate results.- Parameters:
pBytes- Bytes to update cipher withpOffset- offset within pBytes to read bytes frompLength- length of data to update with- Returns:
- the intermediate processed data
- Throws:
GordianException- on error
-
update
Process the passed data and return intermediate results.- Parameters:
pBytes- Bytes to update cipher withpOffset- offset within pBytes to read bytes frompLength- length of data to update withpOutput- 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 withpOffset- offset within pBytes to read bytes frompLength- length of data to update withpOutput- the output buffer to receive processed datapOutOffset- offset within pOutput to write bytes to- Returns:
- the number of bytes transferred to the output buffer
- Throws:
GordianException- on error
-
finish
Complete the Cipher operation and return final results.- Returns:
- the remaining processed data
- Throws:
GordianException- on error
-
finish
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
Process the passed data and return final results.- Parameters:
pBytes- Bytes to update cipher withpOffset- offset within pBytes to read bytes frompLength- length of data to update with- Returns:
- the remaining processed data
- Throws:
GordianException- on error
-
finish
Process the passed data and return final results.- Parameters:
pBytes- Bytes to update cipher withpOffset- offset within pBytes to read bytes frompLength- length of data to update withpOutput- 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 withpOffset- offset within pBytes to read bytes frompLength- length of data to update withpOutput- the output buffer to receive processed datapOutOffset- offset within pOutput to write bytes to- Returns:
- the number of bytes transferred to the output buffer
- Throws:
GordianException- on error
-
finish
Complete the Cipher operation and return final results.- Parameters:
pOutput- the output buffer to receive processed datapOutOffset- offset within pOutput to write bytes to- Returns:
- the number of bytes transferred to the output buffer
- Throws:
GordianException- on error
-