# Path: pgp/cipher/twofish.py
# class _TwofishObj(_InternalObj):
# class TwofishCipher(blockalgo.BlockAlgo):
#     def _create_impl(cls, key):
#     def __init__(self, key, *args, **kwargs):
# def new(key, *args, **kwargs):
# MODE_ECB = 1
# MODE_CBC = 2
# MODE_CFB = 3
# MODE_PGP = 4
# MODE_OFB = 5
# MODE_CTR = 6
# MODE_OPENPGP = 7
# MODE_EAX = 9


import unittest
import warnings
from pgp.cipher import twofish
    from Crypto.SelfTest.Cipher.common import make_block_tests
     '000000000000000000000000000000000000000000000000',
     '192-bit key'),

    ('80000000000000000000000000000000', '23a385f617f313dac05bcb7eabd61807',
     '0000000000000000000000000000000000000000000000000000000000000000',
     '256-bit key'),

    # cbc_e_m.txt - the examples in this file appear to be just wrong
    # I verified the results below using
    # http://twofish.online-domain-tools.com/ as a reference implementation
    ('00000000000000000000000000000000', '9f589f5cf6122c32b6bfec2f2ae8c35a',
     '00000000000000000000000000000000',
     '128-bit key',
     dict(mode='CBC', iv='00000000000000000000000000000000')),

    ('00000000000000000000000000000000', 'efa71f788965bd4453f860178fc19101',
     '000000000000000000000000000000000000000000000000',
     '192-bit key',
     dict(mode='CBC', iv='00000000000000000000000000000000')),

    ('00000000000000000000000000000000', '57ff739d4dc92c1bd7fc01700cc8216f',
     '0000000000000000000000000000000000000000000000000000000000000000',
     '256-bit key',
     dict(mode='CBC', iv='00000000000000000000000000000000')),

]


def test_twofish():


# Path: pgp/cipher/twofish.py
# class _TwofishObj(_InternalObj):
# class TwofishCipher(blockalgo.BlockAlgo):
#     def _create_impl(cls, key):
#     def __init__(self, key, *args, **kwargs):
# def new(key, *args, **kwargs):
# MODE_ECB = 1
# MODE_CBC = 2
# MODE_CFB = 3
# MODE_PGP = 4
# MODE_OFB = 5
# MODE_CTR = 6
# MODE_OPENPGP = 7
# MODE_EAX = 9


# Path: pgp/cipher/tests/test_twofish.py
import unittest
import warnings
from pgp.cipher import twofish
    from Crypto.SelfTest.Cipher.common import make_block_tests

     '000000000000000000000000000000000000000000000000',
     '192-bit key'),

    ('80000000000000000000000000000000', '23a385f617f313dac05bcb7eabd61807',
     '0000000000000000000000000000000000000000000000000000000000000000',
     '256-bit key'),

    # cbc_e_m.txt - the examples in this file appear to be just wrong
    # I verified the results below using
    # http://twofish.online-domain-tools.com/ as a reference implementation
    ('00000000000000000000000000000000', '9f589f5cf6122c32b6bfec2f2ae8c35a',
     '00000000000000000000000000000000',
     '128-bit key',
     dict(mode='CBC', iv='00000000000000000000000000000000')),

    ('00000000000000000000000000000000', 'efa71f788965bd4453f860178fc19101',
     '000000000000000000000000000000000000000000000000',
     '192-bit key',
     dict(mode='CBC', iv='00000000000000000000000000000000')),

    ('00000000000000000000000000000000', '57ff739d4dc92c1bd7fc01700cc8216f',
     '0000000000000000000000000000000000000000000000000000000000000000',
     '256-bit key',
     dict(mode='CBC', iv='00000000000000000000000000000000')),

]


def test_twofish():


    if twofish is None: