from zope.interface import implements
from twisted.internet import defer
-import sha
-from allmydata.util import idlib, mathutil
+from allmydata.util import mathutil
from allmydata.util.assertutil import precondition
from allmydata.interfaces import ICodecEncoder, ICodecDecoder
import fec
import os
from twisted.trial import unittest
-from twisted.internet import defer
from twisted.python import log
from allmydata.codec import ReplicatingEncoder, ReplicatingDecoder, CRSEncoder, CRSDecoder
import random