Oracle Security Developer Tools Crypto Java API Reference
10g Release 2 (10.1.2.0.2)

B15565-01


oracle.security.crypto.core
Class Padding

java.lang.Object
  extended byoracle.security.crypto.core.Padding


public abstract class Padding
extends java.lang.Object

Padding contains the ID constants that indicate padding schemes.

Since:
2.2

Nested Class Summary
static class Padding.ID
Represents a padding mode value that can be used by block ciphers.

Field Summary
static Padding.ID NONE
Indicates that NO padding should be used for block ciphers.
static Padding.ID PKCS5
Indicates that PKCS5 padding should be used for block ciphers.

Constructor Summary
protected Padding()

Method Summary
abstract java.lang.String algName()
The name of the padding algorithm.
abstract byte[] pad(byte[] bytes, int blockSize)
Returns bytes padded to a multiple of blockSize.
abstract byte[] unpad(byte[] bytes)
Returns bytes unpadded.

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

NONE

public static final Padding.ID NONE
Indicates that NO padding should be used for block ciphers.

PKCS5

public static final Padding.ID PKCS5
Indicates that PKCS5 padding should be used for block ciphers.

Constructor Detail

Padding

protected Padding()

Method Detail

algName

public abstract java.lang.String algName()
The name of the padding algorithm.

pad

public abstract byte[] pad(byte[] bytes,
                           int blockSize)
                    throws CipherException
Returns bytes padded to a multiple of blockSize.
Throws:
CipherException

unpad

public abstract byte[] unpad(byte[] bytes)
                      throws CipherException
Returns bytes unpadded.
Throws:
CipherException

Oracle Security Developer Tools Crypto Java API Reference
10g Release 2 (10.1.2.0.2)

B15565-01


Copyright © 2005 , Oracle. All rights reserved.