'Check that crypto meta dict has valid items.
:param meta: a dict
:raises EncryptionException: if an error is found in the crypto meta'

def check_crypto_meta(self, meta):

    try:
        if (meta['cipher'] != self.cipher):
            raise EncryptionException(('Bad    crypto    meta:    Cipher    must    be    %s' % self.cipher))
        if (len(meta['iv']) != self.iv_length):
            raise EncryptionException(('Bad    crypto    meta:    IV    must    be    length    %s    bytes' % self.iv_length))
    except KeyError as err:
        raise EncryptionException(('Bad    crypto    meta:    Missing    %s' % err))
