Fix IV handling in clustered environments (EncryptedMapDecorator.java)

Patch for EncryptedMapDecorator.java (cas-server-extension-clearpass). Returns IV (16 bytes) prepended to ciphertext on encrypt(); mandatory for proper decryption. Useful in clustered environments where IVs saved to thread-safe ConcurrentHashMaps are being stored locally in memory, thus rendering other systems in the cluster unable to decrypt a ciphertext without the original IV being made accessible. This solves the problem by including the IV as part of encrypt()'s return value. Added IV_ROUNDS and SALT_ROUNDS for demonstration purposes.

See https://gist.github.com/rdev5/7570750 for details.
Update EncryptedMapDecorator.java
Update EncryptedMapDecorator.java

Cleaned up some changes in recent commit. Derive iv_size from Cipher#getBlockSize() and prepend 4-byte integer value to IV and ciphertext.
Update EncryptedMapDecorator.java

Addressing several build warnings.
Update EncryptedMapDecorator.java

Fixed variable name
Update EncryptedMapDecorator.java

Added error handling for unreported exception javax.crypto.NoSuchPaddingException
Update EncryptedMapDecorator.java

Removed unused import java.nio.ByteOrder and addressed variable name warnings for iv_size, iv_value, and iv_spec.
Update EncryptedMapDecorator.java

Changed ivSize type to int. Added int2byte() and byte2int() helper methods.
Update EncryptedMapDecorator.java
CAS-1386: Fix IV handling for ClearPass in clustered environments

JIRA: https://issues.jasig.org/browse/CAS-1386
CAS-1386: Fix IV handling for ClearPass in clustered environments

JIRA: https://issues.jasig.org/browse/CAS-1386
CAS-1386: Fix IV handling for ClearPass in clustered environments

Force lowercase of username in case-sensitive hashing
Force lowercase of username in case-sensitive hashing

Intended to stay consistent with forced lowercasing of case-sensitive username key in constructHashedKey().

Refer to https://github.com/Jasig/cas/pull/359
Merge pull request #359 from rdev5/patch-2

CAS-1386: Fix IV handling for ClearPass in clustered environments