Save This Page
Home » openjdk-7 » com.sun.crypto » provider » [javadoc | source]
com.sun.crypto.provider
final class: PKCS5Padding [javadoc | source]
java.lang.Object
   com.sun.crypto.provider.PKCS5Padding

All Implemented Interfaces:
    Padding

This class implements padding as specified in the PKCS#5 standard.
Constructor:
 PKCS5Padding(int blockSize) 
Method from com.sun.crypto.provider.PKCS5Padding Summary:
padLength,   padWithLen,   unpad
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.sun.crypto.provider.PKCS5Padding 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 the padding starts.

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