The challenge is to make sure you set the exact same binary key. Your code snippet above transforms a password string to the exact binary secret key via the getKey(password) call. You would need to know the exact algorithm/transformation that is used to transform from a password string to a 16-bit or 32-byte key, and this would need to be duplicated in the ASP code..