Package 

Interface Padding.Native

    • Method Summary

      Modifier and Type Method Description
      abstract boolean sodiumPad(IntByReference paddedBuffLen, Pointer buf, int unpaddedBufLen, int blockSize, int maxBufLen) Adds extra padding to a buffer {@code buf} whoseoriginal size is {@code unpaddedBufLen} in orderto extend its total length to a multiple of {@code blocksize}.
      abstract boolean sodiumUnpad(IntByReference unpaddedBufLen, Pointer buf, int paddedBufLen, int blockSize) Computes the original, unpadded length of a message previously padded using sodiumPad.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • sodiumPad

         abstract boolean sodiumPad(IntByReference paddedBuffLen, Pointer buf, int unpaddedBufLen, int blockSize, int maxBufLen)

        Adds extra padding to a buffer {@code buf} whoseoriginal size is {@code unpaddedBufLen} in orderto extend its total length to a multiple of {@code blocksize}.

        Parameters:
        paddedBuffLen - New length of buffer.
        buf - The buffer byte array.
        unpaddedBufLen - The length of {@code buf} with no padding.
        blockSize - Block size.
        maxBufLen - The absolute maximum you want this buffer lengthto be.
      • sodiumUnpad

         abstract boolean sodiumUnpad(IntByReference unpaddedBufLen, Pointer buf, int paddedBufLen, int blockSize)

        Computes the original, unpadded length of a message previously padded using sodiumPad. The original length is put into {@code unpaddedBufLen}.

        Parameters:
        unpaddedBufLen - This will be populated with the unpadded buffer length.
        buf - The buffer.
        paddedBufLen - The padded buffer size.
        blockSize - The block size.