Package org.springframework.security.crypto.encrypt

## Class BouncyCastleAesCbcBytesEncryptor

- java.lang.Object
- - org.springframework.security.crypto.encrypt.BouncyCastleAesCbcBytesEncryptor

All Implemented Interfaces:
  `BytesEncryptor`

    public class BouncyCastleAesCbcBytesEncryptor
    extends java.lang.Object

An Encryptor equivalent to `AesBytesEncryptor` using `AesBytesEncryptor.CipherAlgorithm.CBC` that uses Bouncy Castle instead of JCE. The algorithm is equivalent to "AES/CBC/PKCS5Padding".

### Constructor Summary

Constructors
`BouncyCastleAesCbcBytesEncryptor​(java.lang.String password, java.lang.CharSequence salt)`
`BouncyCastleAesCbcBytesEncryptor​(java.lang.String password, java.lang.CharSequence salt, BytesKeyGenerator ivGenerator)`

### Method Summary

All Methods Instance Methods Concrete Methods
`byte[]` `decrypt​(byte[] encryptedBytes)` Decrypt the byte array.
`byte[]` `encrypt​(byte[] bytes)` Encrypt the byte array.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### BouncyCastleAesCbcBytesEncryptor

    public BouncyCastleAesCbcBytesEncryptor​(java.lang.String password,
                                            java.lang.CharSequence salt)

#### BouncyCastleAesCbcBytesEncryptor

    public BouncyCastleAesCbcBytesEncryptor​(java.lang.String password,
                                            java.lang.CharSequence salt,
                                            BytesKeyGenerator ivGenerator)

### Method Detail

#### encrypt

    public byte[] encrypt​(byte[] bytes)

Description copied from interface: `BytesEncryptor`
Encrypt the byte array.

#### decrypt

    public byte[] decrypt​(byte[] encryptedBytes)

Description copied from interface: `BytesEncryptor`
Decrypt the byte array.