Skip to content

Commit

Permalink
added str to byets
Browse files Browse the repository at this point in the history
  • Loading branch information
josephmancuso committed Oct 27, 2019
1 parent b3d1359 commit 08155a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/masonite/auth/Sign.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def sign(self, value):
raise InvalidSecretKey(
"You have passed an invalid secret key of: {}. Make sure you have correctly added your secret key.".format(self.key))

self.encryption = f.encrypt(bytes(value, 'utf-8'))
self.encryption = f.encrypt(bytes(str(value), 'utf-8'))
return self.encryption.decode('utf-8')

def unsign(self, value=None):
Expand All @@ -65,4 +65,4 @@ def unsign(self, value=None):

if not value:
return f.decrypt(self.encryption).decode('utf-8')
return f.decrypt(bytes(value, 'utf-8')).decode('utf-8')
return f.decrypt(bytes(str(value), 'utf-8')).decode('utf-8')

0 comments on commit 08155a4

Please sign in to comment.