Add debugging output if buffer allocation fails for scrypt and round up bufsize to a multiple of 256.