public interface Padding
| Modifier and Type | Method and Description |
|---|---|
int |
pad(byte[] in,
int off,
int len)
Performs padding for the given data input.
|
int |
padLength(int len)
Determines how long the padding will be for a given input length.
|
void |
padWithLen(byte[] in,
int off,
int len)
Adds the given number of padding bytes to the data input.
|
int |
unpad(byte[] in,
int off,
int len)
Returns the index where padding starts.
|
int pad(byte[] in,
int off,
int len)
throws javax.crypto.ShortBufferException
in - the input buffer with the data to padoff - the offset in in where the data to pad startslen - the length of the data to padjavax.crypto.ShortBufferException - if in is too small to hold
the padding bytesvoid padWithLen(byte[] in,
int off,
int len)
throws javax.crypto.ShortBufferException
in - the input buffer with the data to padthe - offset in in where the padding bytes
are appendedlen - the number of padding bytes to addjavax.crypto.ShortBufferException - if in is too small to hold
the padding bytesint unpad(byte[] in,
int off,
int len)
Given a buffer with data and their padding, this method returns the index where the padding starts.
in - the buffer with the data and their paddingoff - the offset in in where the data startslen - the length of the data and their paddingint padLength(int len)
len - the length of the data to pad© Portions Copyright 2003, 2012 IBM Corporation. All rights reserved.
© Portions Copyright 2003, 2012, Oracle and/or its affiliates. All rights reserved.