<p>I have this query in sql server 2000:</p>

<pre><code>select pwdencrypt('AAAA')
</code></pre>

<p>which outputs an encrypted string of 'AAAA':</p>

<pre>
0x0100CF465B7B12625EF019E157120D58DD46569AC7BF4118455D12625EF019E157120D58DD46569AC7BF4118455D
</pre>

<p><strong>How can I convert (decrypt) the output from its origin (which is 'AAAA')?</strong></p>

I believe pwdencrypt is using a hash so you cannot really reverse the hashed string - the algorithm is designed so it's impossible.
If you are verifying the password that a user entered the usual technique is to hash it and then compare it to the hashed version in the database.
This is how you could verify a usered entered table
```
```
SELECT password_field FROM mytable WHERE password_field=pwdencrypt(userEnteredValue)
```
```
Replace userEnteredValue with (big surprise) the value that the user entered :)