_block_tail is deprecated and removed

This commit is contained in:
Manuel Ebert 2012-04-16 21:40:59 +02:00
parent 7bec54f2b0
commit f7ebe41fd4

View file

@ -13,7 +13,7 @@ try: import simplejson as json
except ImportError: import json except ImportError: import json
import sys import sys
import readline, glob import readline, glob
from Crypto.Cipher import AES from ` import AES
from Crypto.Random import random, atfork from Crypto.Random import random, atfork
import hashlib import hashlib
import getpass import getpass
@ -82,12 +82,6 @@ class Journal:
self.entries = self.parse(journal_txt) self.entries = self.parse(journal_txt)
self.sort() self.sort()
def _block_tail(self, s, b=16, force=False):
"""Appends spaces to a string until length is a multiple of b"""
if force and len(s) % 16 == 0:
return s + " "*16
return s + " "*(b - len(s) % b)
def _decrypt(self, cipher): def _decrypt(self, cipher):
"""Decrypts a cipher string using self.key as the key and the first 16 byte of the cipher as the IV""" """Decrypts a cipher string using self.key as the key and the first 16 byte of the cipher as the IV"""
if not cipher: if not cipher: