PWDENCRYPT (Transact-SQL)

**APPLIES TO:** ![yes](media/yes.png)SQL Server (starting with 2008) ![no](media/no.png)Azure SQL Database ![no](media/no.png)Azure SQL Data Warehouse ![no](media/no.png)Parallel Data Warehouse

Returns the SQL Server password hash of the input value that uses the current version of the password hashing algorithm.

PWDENCRYPT is an older function and might not be supported in a future release of SQL Server Use HASHBYTES instead. HASHBYTES provides more hashing algorithms.

Topic link icon Transact-SQL Syntax Conventions

Syntax

  
PWDENCRYPT ( 'password' )  

Arguments

password
Is the password to be encrypted. password is sysname.

Return Types

varbinary(128)

Permissions

PWDENCRYPT is available to public.

See Also

Security Functions (Transact-SQL)
PWDCOMPARE (Transact-SQL)