rubycas/rubycas-server — pull request #119 by tpickett66 (2012-10-02 16:52:15+00:00)
Title: random_string refactor

This patch doesn't add any functionality but should improve maintainability.

What I've done here is implement ```String.random``` with the same behavior as the original ```Utils.random_string``` function; the rational for this small change is to improve maintainability by eliminating an external dependency, ```crypt-isaac```, for those not using the SQLEncrypted authenticator. Also the move to a built in class will lessen the impact of ```CASServer::Utils```being (re)moved.

There is some short term pain to this solution in that someone (I'll do this if this is an acceptable direction) will need to go in and fix all of the calls to the old function. Additionally in order to maintain Ruby 1.8 support we'll be limited to ActiveSupport <= 3.1. As more people migrate to running1.9+ we'll get to use the core lib implementation of ```SecureRandom``` which includes the ```urlsafe_base64``` implementation that is oddly missing from ```ActiveSupport 3.0.12``` that I was testing against.