SQLTeam.com | Weblogs | Forums

How to get user data from encrypted hash on sql server 2017?

How to extract data from hashbyte text after hash or encrypted on SQL

how to extract data from hashbyte text after hash or encrypted on sql server 2017 ?

I work on sql server 2017 i have field nvarchar(max) store values hashbytes

suppose i have text as username:sayed password:321

and i hash it by using hashbyte

so after hashing by using hashbyte

i need to extract data from it

meaning i need to get data of user as

username:sayed password:321

so how to extract data from field hashed by using hashbyte sql server 2017

meaning

How to get data password:321

i hash my text as below

select HASHBYTES('SHA2_512','username:sayed password:321')

how to get text

username:sayed password:321

from hashed below

0x11AF8281C1FB70097586CDCA6A9B2CA35BCC464CCD4F57D3C1D347371EB8433015080669AE93141D8A170822BB803CC36015841ED3BA853D322201C4A25F9E8D

By design, hashing is a one-way function, it can't be decrypted like an encryption function can. In order to recover information from a hashed value you'd have to generate the plaintext value by brute force and hash it so you could compare it to the stored hash.

By design, hashing is a one-way function, it can't be decrypted like an encryption function can. In order to recover information from a hashed value you'd have to generate the plaintext value by brute force and hash it so you could compare it to the stored hash.