trim hash whitespace in validatehash
parent
692de7a147
commit
172e709c46
|
@ -99,8 +99,9 @@ class OnionrUtils:
|
||||||
def validateHash(self, data, length=64):
|
def validateHash(self, data, length=64):
|
||||||
'''Validate if a string is a valid hex formatted hash'''
|
'''Validate if a string is a valid hex formatted hash'''
|
||||||
retVal = True
|
retVal = True
|
||||||
if retVal == False or retVal:
|
if retVal == False or retVal == True:
|
||||||
return False
|
return False
|
||||||
|
data = data.strip()
|
||||||
if len(data) != length:
|
if len(data) != length:
|
||||||
retVal = False
|
retVal = False
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue