Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Encrypt string
Message
From
30/10/2023 13:07:59
 
 
To
30/10/2023 12:57:56
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Title:
Miscellaneous
Thread ID:
01687138
Message ID:
01687146
Views:
51
I assume that you misunderstand. A hash has absolutely nothing to do with encryption. It's a value that's calculated from the given string using advanced math. That's why I wrote that there's no way to reverse engineer the hash to get the password.

Actually, several strings can have the same hash, although you have to be lucky to find some.

You store the hash for the password in your table. Then when you want to verify a given password, you calculate the hash for this password, and compare it to the password hash in your table.

>I encrypt a password in MySQL
>
>
>inputcode='@bcde'
>
>STORE calcSqlConnect() TO dlnConnHandle
>TEXT TO dlcSQL TEXTMERGE noshow
>SELECT sha1(inputcode) as myencrypt 
>ENDTEXT 
>STORE SQLEXEC(dlnConnHandle,dlcSql,'myresult') TO dlnSql
>SQLDISCONNECT(dlnConnHandle)
>
>How can I take out the return value from MySQL?
>
>
>Thanks for the help
>
>Jerry
>
>
>
>>You can't reverse a hashed password, period.
>>
>>>Got it.
>>>
>>>My understanding is if I use SHA-1, and the user knows I use SHA-1, there is no way to reverse it. Is that correct?
>>>
>>>Jerry
>>>
>>>
>>>
>>>>>How can I encrypt a string, example I want to encrypt the password
>>>>
>>>>Basically, you don't. A better idea is to store the value ("digest") of the string when processed through a hash function.
>>>>
>>>>Overview at https://securityboulevard.com/2020/05/hashing-what-you-need-to-know-about-storing-passwords/
Previous
Reply
Map
View

Click here to load this message in the networking platform