Fixed keylength calculation. See PHPCRED-25