'Pyspark SQL SHA1 encryption conversion to bigint
I need bigint version of sha1 encrypted text. This is the sha1 converted ouputed,
select upper(sha1('THIsneedstobeChanges'))
output
upper(sha1(CAST(THIsneedstobeChanges AS BINARY)))
0BF3770DF2705F6318491A955D32666395810537
So now I need to convert it to bigint
select cast(upper(sha1('THIsneedstobeChanges')) as bigint)
Output is null.
Basically I am trying to replicate this code from SQL to spark -SQL,
select cast(HASHBYTES('SHA1', 'testdata') as bigint)
Could you please help with this issue
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
