def _prepare_bucket_entry_hmac(self, shard_array):
"""
Args:
shard_array (): .
"""
storj_keyring = model.Keyring()
encryption_key = storj_keyring.get_encryption_key('test')
current_hmac = ''
for shard in shard_array:
base64_decoded = '%s%s' % (base64.decodestring(shard.hash),
current_hmac)
current_hmac = self._calculate_hmac(base64_decoded, encryption_key)
self.__logger.debug('current_hmac=%s' % current_hmac)
return current_hmac
评论列表
文章目录