Public Function Decrypt(ByVal data As String, ByVal userKey As String, _ ByVal alg As EncryptionAlgorithm) As Boolean Dim tok As [String]() = data.Split(New Char() {" "c}) Dim initVector As [String] = tok(0) data = tok(1) ' Set up the Decryptor object Dim dec As New Decryptor(alg) ' Set the Initialization Vector dec.IV = Convert.FromBase64String(initVector) Dim key As Byte() = Encoding.Default.GetBytes(userKey) ' Perform the decryption If Not dec.Decrypt(Convert.FromBase64String(data), key) Then Return False End If cDecrypt = Encoding.Default.GetString(dec.oByte) Return True End FunctionI adjusted it to remove the Try Catch so it would be easier to follow it.