|
@@ -4,7 +4,7 @@ import getpass
|
|
|
import os
|
|
|
import sys
|
|
|
import textwrap
|
|
|
-import hmac
|
|
|
+from hmac import HMAC
|
|
|
from hashlib import sha256
|
|
|
|
|
|
from .helpers import IntegrityError, get_keys_dir, Error
|
|
@@ -30,13 +30,6 @@ class RepoKeyNotFoundError(Error):
|
|
|
"""No key entry found in the config of repository {}."""
|
|
|
|
|
|
|
|
|
-class HMAC(hmac.HMAC):
|
|
|
- """Workaround a bug in Python < 3.4 Where HMAC does not accept memoryviews
|
|
|
- """
|
|
|
- def update(self, msg):
|
|
|
- self.inner.update(msg)
|
|
|
-
|
|
|
-
|
|
|
def key_creator(repository, args):
|
|
|
if args.encryption == 'keyfile':
|
|
|
return KeyfileKey.create(repository, args)
|