Skip navigation links

Oracle Fusion Middleware Crypto FIPS Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10696-05


oracle.security.crypto.core
Class Padding

java.lang.Object
  extended by oracle.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()
          Empty constructor.

 

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()
Empty constructor.

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

Skip navigation links

Oracle Fusion Middleware Crypto FIPS Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10696-05


Copyright © 2005, 2013, Oracle. All rights reserved.