|
@@ -380,7 +380,10 @@ def time(**remainder):
|
|
|
def hash(a, **remainder):
|
|
|
a_value, = yield [("RV", [a])]
|
|
|
import hashlib
|
|
|
- b_value = hashlib.sha512(a_value).hexdigest()
|
|
|
+ try:
|
|
|
+ b_value = hashlib.sha512(a_value).hexdigest()
|
|
|
+ except TypeError:
|
|
|
+ b_value = hashlib.sha512(a_value.encode()).hexdigest()
|
|
|
b, = yield [("CNV", [b_value])]
|
|
|
raise PrimitiveFinished(b)
|
|
|
|