Use correct length for $encryptedKey.