- Timestamp:
- 10/05/09 13:55:39 (10 months ago)
- Files:
-
- fCryptography.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
fCryptography.php
r599 r709 Hide Line Numbers 10 10 * @link http://flourishlib.com/fCryptography 11 11 * 12 * @version 1.0.0b5 12 * @version 1.0.0b6 13 * @changes 1.0.0b6 Changed ::symmetricKeyEncrypt() to throw an fValidationException when the $secret_key is less than 8 characters [wb, 2009-09-30] 13 14 * @changes 1.0.0b5 Fixed a bug where some windows machines would throw an exception when generating random strings or numbers [wb, 2009-06-09] 14 15 * @changes 1.0.0b4 Updated for new fCore API [wb, 2009-02-16] … … 485 486 * Since this is symmetric-key cryptography, the same key is used for 486 487 * encryption and decryption. 488 * 489 * @throws fValidationException When the $secret_key is less than 8 characters long 487 490 * 488 491 * @param string $plaintext The content to be encrypted 489 * @param string $secret_key The secret key to use for encryption 492 * @param string $secret_key The secret key to use for encryption - must be at least 8 characters 490 493 * @return string An encrypted and base-64 encoded result containing a Flourish fingerprint and suitable for decryption using ::symmetricKeyDecrypt() 491 494 */ … … 493 496 { 494 497 if (strlen($secret_key) < 8) { 495 throw new f ProgrammerException(498 throw new fValidationException( 496 499 'The secret key specified does not meet the minimum requirement of being at least %s characters long', 497 500 8
