public class X923Padding extends Object implements BlockCipherPadding
Constructor and Description |
---|
X923Padding() |
Modifier and Type | Method and Description |
---|---|
int |
addPadding(byte[] in,
int inOff)
add the pad bytes to the passed in block, returning the
number of bytes added.
|
String |
getPaddingName()
Return the name of the algorithm the padder implements.
|
void |
init(SecureRandom random)
Initialise the padder.
|
int |
padCount(byte[] in)
return the number of pad bytes present in the block.
|
public void init(SecureRandom random) throws IllegalArgumentException
init
in interface BlockCipherPadding
random
- a SecureRandom if one is available.IllegalArgumentException
public String getPaddingName()
getPaddingName
in interface BlockCipherPadding
public int addPadding(byte[] in, int inOff)
addPadding
in interface BlockCipherPadding
public int padCount(byte[] in) throws InvalidCipherTextException
padCount
in interface BlockCipherPadding
InvalidCipherTextException
- if the padding is badly formed
or invalid.Copyright © 2015. All rights reserved.