'Test that setKeys sets up the ciphers.'

def test_setKeysCiphers(self):

    key = ('\x00' * 64)
    for cipName in transport.SSHTransportBase.supportedCiphers:
        (modName, keySize, counter) = transport.SSHCiphers.cipherMap[cipName]
        encCipher = transport.SSHCiphers(cipName, 'none', 'none', 'none')
        decCipher = transport.SSHCiphers('none', cipName, 'none', 'none')
        cip = encCipher._getCipher(cipName, key, key)
        bs = (cip.algorithm.block_size // 8)
        encCipher.setKeys(key, key, '', '', '', '')
        decCipher.setKeys('', '', key, key, '', '')
        self.assertEqual(encCipher.encBlockSize, bs)
        self.assertEqual(decCipher.decBlockSize, bs)
        encryptor = cip.encryptor()
        enc = encryptor.update(key[:bs])
        enc2 = encryptor.update(key[:bs])
        self.assertEqual(encCipher.encrypt(key[:bs]), enc)
        self.assertEqual(encCipher.encrypt(key[:bs]), enc2)
        self.assertEqual(decCipher.decrypt(enc), key[:bs])
        self.assertEqual(decCipher.decrypt(enc2), key[:bs])
