All Packages Class Hierarchy This Package Previous Next Index
Class java.security.Padding
java.lang.Object
|
+----java.security.Padding
- public abstract class Padding
- extends Object
ATTENTION:
This is NOT the implementation from Sun. This class
has been developed by IAIK according to the documentation
publically available. Only the documentation from Sun has been
inserted into the source files.
This interface is implemented by classes that provide a
general-purpose padding scheme, such as the one described in
PKCS#5 or in RFC 1423 (PEM).
-
Padding()
-
-
getName()
-
-
pad(byte[])
- Returns the padded array for a given array.
-
pad(byte[], int, int)
- Returns the padding for a given array of bytes.
-
paddingScheme()
- Returns the standard name of the padding scheme implemented.
-
padLength(int)
- Returns the absolute value of the increase in size which a
padding operation would cause on input data of a given length.
-
unpad(byte[])
- Returns the unpadded array.
-
unpad(byte[], int, int)
- Given the specified subarray of bytes that includes padding
bytes, returns the length of the unpadded message.
Padding
public Padding()
pad
public abstract int pad(byte in[],
int off,
int len)
- Returns the padding for a given array of bytes. The padded
bytes are written to the same buffer that is used for input ("in").
- Parameters:
- in - - the buffer to pad.
- off - - the offset into the
in
buffer of the
first byte in the group of bytes to be padded.
- len - - the number of bytes from the
in
buffer,
starting at off
, that need to be padded.
- Returns:
- the number of padding bytes written to out.
unpad
public abstract int unpad(byte in[],
int off,
int len)
- Given the specified subarray of bytes that includes padding
bytes, returns the length of the unpadded message.
- Parameters:
- in - - the buffer containing the bytes.
- off - - the starting offset in the
in
buffer
of the bytes to be checked to determine where padding starts.
- len - - the number of bytes from the
in
buffer
to check, starting at offset off
.
- Returns:
- the length of the unpadded message.
padLength
public abstract int padLength(int len)
- Returns the absolute value of the increase in size which a
padding operation would cause on input data of a given length.
- Parameters:
- len - - the length of the data which is to be padded.
- Returns:
- the absolute value of the increase in size which a
padding operation would cause on input data of the specified length.
paddingScheme
public abstract String paddingScheme()
- Returns the standard name of the padding scheme implemented.
See Appendix A in the
Java Cryptography Extension API Specification & Reference
for more information about standard names for padding schemes.
- Returns:
- the standard name of the padding scheme, such as "PKCS#5".
getName
public abstract String getName()
pad
public byte[] pad(byte in[])
- Returns the padded array for a given array.
ATTENTION: This method is not defined in the
sun java.security.Padding interface but useful.
- Parameters:
- in - the array to pad
- Returns:
- the padded array
unpad
public byte[] unpad(byte in[])
- Returns the unpadded array.
ATTENTION: This method is not defined in the
sun java.security.Padding interface but useful.
- Parameters:
- in - the padded array
- Returns:
- the unpadded array
All Packages Class Hierarchy This Package Previous Next Index