I want to compare two strings
I need It for my OS cuz It have two login systems (one with the http API (mysql) and one with user data on the computer). So, or the second oneI need to compare two SHA1 Hashs
how can I do that?
Posted 22 April 2013 - 04:26 AM
Posted 22 April 2013 - 04:27 AM
if 'stringTest1' == 'stringText1' then
print('they match')
else
print('they don't match')
end
Posted 22 April 2013 - 05:17 AM
if string.lower(hash1) == string.lower(hash2) then
print('they match')
else
print('they don\'t match')
end
Posted 22 April 2013 - 05:20 AM
SuicidalSTDz, on 22 April 2013 - 05:16 AM, said:
local function check(firstStr, secStr) if firstStr ~= secStr then return false end return true endEverything is better with functions
local function check(firstStr, secStr) return firstStr == secStr endOne of my pet peeves is when people use an if statement to then only return a boolean, just return the if statements condition!!!
Posted 22 April 2013 - 05:32 AM
theoriginalbit, on 22 April 2013 - 05:20 AM, said:
0 members, 1 guests, 0 anonymous users