|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectxjava.security.IJCE_Traceable
xjava.security.PaddingScheme
cryptix.provider.padding.OneAndZeroes
public final class OneAndZeroes
Class for padding cipher data with a binary-digit one, followed by
as many binary-digit zeroes as needed to fill this instance's
blockSize
.
Copyright © 1997
Systemics Ltd on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: 1.4 $
java.security.PaddingScheme
Field Summary |
---|
Fields inherited from class xjava.security.PaddingScheme |
---|
blockSize |
Constructor Summary | |
---|---|
OneAndZeroes()
Creates a OneAndZeroes object. |
Method Summary | |
---|---|
protected boolean |
engineIsValidBlockSize(int size)
SPI: Returns true if size is a valid block size (in bytes) for this algorithm. |
protected int |
enginePad(byte[] in,
int offset,
int length)
Pads a given array of bytes. |
protected int |
engineUnpad(byte[] in,
int offset,
int length)
Given the specified subarray of bytes that includes padding bytes, returns the index indicating where padding starts. |
Methods inherited from class xjava.security.PaddingScheme |
---|
clone, engineGetParameter, engineSetBlockSize, engineSetParameter, getAlgorithm, getAlgorithms, getAlgorithms, getBlockSize, getInstance, getInstance, getParameter, pad, paddingScheme, padLength, setParameter, toString, unpad |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public OneAndZeroes()
Method Detail |
---|
protected int enginePad(byte[] in, int offset, int length)
in[offset..offset+blockSize-1]
.
enginePad
in class PaddingScheme
in
- the buffer containing the incomplete block.offset
- the offset into the in buffer of the
first byte in the group of bytes to be padded.length
- the number of bytes from the in buffer,
starting at offset, that need to be padded.
protected int engineUnpad(byte[] in, int offset, int length)
engineUnpad
in class PaddingScheme
in
- the buffer containing the bytes.offset
- the offset into the in buffer of the
first byte in the block.length
- the number of bytes from the in buffer
to check, starting at offset.
protected boolean engineIsValidBlockSize(int size)
For OneAndZeroes padding, all sizes are valid.
engineIsValidBlockSize
in class PaddingScheme
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |