getInstance

A transformation string is provided to initialize a Cipher object. A transformation always includes the name of a cryptographic algorithm and may be followed by a feedback mode and padding scheme. It is of the form:


  • "algorithm/mode/padding" or ·

  • "algorithm"

The supported padding schemes are:


  • NoPadding

  • PKCS7Padding

  • PKCS5Padding (default for symmetric ciphers)

PKCS7Padding and PKCS5Padding are the same algorithm. Both use the same native padding implementation CPaddingPKCS7.

The supported algorithm modes are: ·


  • ECB (default for symmetric ciphers)

  • CBC

  • NONE

The supported algorithms are listed in the table below. DES, AES, RC2 and DESede are symmetric ciphers and RSA is asymmetric cipher.

Algorithm

Block size

Modes

DES

8

CBC, ECB

AES

16

CBC, ECB

DESede

8

CBC, ECB

RC2

64

CBC, ECB

RSA

64

-