Jasig/cas — pull request #359 by rdev5 (2013-11-20 23:07:07+00:00)
Title: 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.