Move Scrypt helper function out of AES module.
Fix a compiler warning.