Methods Summary |
---|
public int | addPadding(byte[] in, int inOff)add the pad bytes to the passed in block, returning the
number of bytes added.
int added = (in.length - inOff);
while (inOff < in.length)
{
in[inOff] = (byte) 0;
inOff++;
}
return added;
|
public java.lang.String | getPaddingName()Return the name of the algorithm the padder implements.
return "ZeroByte";
|
public void | init(java.security.SecureRandom random)Initialise the padder.
// nothing to do.
|
public int | padCount(byte[] in)return the number of pad bytes present in the block.
int count = in.length;
while (count > 0)
{
if (in[count - 1] != 0)
{
break;
}
count--;
}
return in.length - count;
|