Skip to content

Commit

Permalink
Making \util\String::hash() now throw an exception instead of forwa…
Browse files Browse the repository at this point in the history
…rding calls to `\security\Crypto`, so as to force proper code updates.
  • Loading branch information
nateabele committed Jun 4, 2011
1 parent 4081de0 commit 73476ba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libraries/lithium/util/String.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

use Closure;
use Exception;
use lithium\security\Crypto;

/**
* String manipulation utility class. Includes functionality for generating UUIDs,
Expand Down Expand Up @@ -59,11 +58,13 @@ public static function uuid() {
}

/**
* This method is deprecated, and has been replaced by `lithium\security\Crypto::hash()`.
*
* @deprecated
* @see lithium\security\Crypto::hash()
*/
public static function hash($string, array $options = array()) {
return Crypto::hash($string, $options);
throw new Exception('This method has been moved to the security\Crypto class.');
}

/**
Expand Down

0 comments on commit 73476ba

Please sign in to comment.