Save This Page
Home » openjdk-7 » com.sun.crypto » provider » [javadoc | source]
interface: Padding [javadoc | source]

All Known Implementing Classes:
    ISO10126Padding, PKCS5Padding

Padding interface. This interface is implemented by general-purpose padding schemes, such as the one described in PKCS#5.
Method from com.sun.crypto.provider.Padding Summary:
padLength,   padWithLen,   unpad
Method from com.sun.crypto.provider.Padding Detail:
 public int padLength(int len)
    Determines how long the padding will be for a given input length.
 public  void padWithLen(byte[] in,
    int off,
    int len) throws ShortBufferException
    Adds the given number of padding bytes to the data input. The value of the padding bytes is determined by the specific padding mechanism that implements this interface.
 public int unpad(byte[] in,
    int off,
    int len)
    Returns the index where padding starts.

    Given a buffer with data and their padding, this method returns the index where the padding starts.