Applies to: SQL Server (all supported versions) Azure SQL Database Azure SQL Managed Instance
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.
PWDENCRYPT ( 'password' )
To view Transact-SQL syntax for SQL Server 2014 and earlier, see Previous versions documentation.
Is the password to be encrypted. password is sysname.
PWDENCRYPT is available to public.