public static interface Padding.Native
| Modifier and Type | Method and Description |
|---|---|
boolean |
sodiumPad(com.sun.jna.ptr.IntByReference paddedBuffLen,
com.sun.jna.Pointer buf,
int unpaddedBufLen,
int blockSize,
int maxBufLen)
Adds extra padding to a buffer
buf whose
original size is unpaddedBufLen in order
to extend its total length to a multiple of blocksize. |
boolean |
sodiumUnpad(com.sun.jna.ptr.IntByReference unpaddedBufLen,
com.sun.jna.Pointer buf,
int paddedBufLen,
int blockSize)
Computes the original, unpadded length of a message previously padded using
sodiumPad(IntByReference, Pointer, int, int, int). |
boolean sodiumPad(com.sun.jna.ptr.IntByReference paddedBuffLen,
com.sun.jna.Pointer buf,
int unpaddedBufLen,
int blockSize,
int maxBufLen)
buf whose
original size is unpaddedBufLen in order
to extend its total length to a multiple of blocksize.paddedBuffLen - New length of buffer.buf - The buffer byte array.unpaddedBufLen - The length of buf with no padding.blockSize - Block size.maxBufLen - The absolute maximum you want this buffer length
to be.maxBufLen.boolean sodiumUnpad(com.sun.jna.ptr.IntByReference unpaddedBufLen,
com.sun.jna.Pointer buf,
int paddedBufLen,
int blockSize)
sodiumPad(IntByReference, Pointer, int, int, int). The original length is put into
unpaddedBufLen.unpaddedBufLen - This will be populated with the unpadded buffer length.buf - The buffer.paddedBufLen - The padded buffer size.blockSize - The block size.