def cipher_supported(self, cipher, mode): # TODO: softhsm only supports AES and 3DES with ECB/CBC return ( isinstance(cipher, (AES, TripleDES)) and isinstance(mode, (ECB, CBC)) )