Exemplo n.º 1
0
 def test_oaep_vect_encryption(self):
     data = self.oaep_vect_data
     for example in data.examples:
         public_key = example.public_key
         for sample in example.samples:
             encrypted = rsaes_oaep.encrypt(public_key, sample.message, seed=sample.seed)
             self.assertEqual(sample.encrypted, encrypted)
Exemplo n.º 2
0
def test_oaep_vect_encryption():
    data = oaep_vect_data
    for example in data.examples:
        public_key = example.public_key
        for sample in example.samples:
            encrypted = rsaes_oaep.encrypt(public_key,
                                           sample.message,
                                           seed=sample.seed)
            assert sample.encrypted == encrypted
Exemplo n.º 3
0
 def test_oaep_vect_encryption(self):
     data = self.oaep_vect_data
     for example in data.examples:
         public_key = example.public_key
         for sample in example.samples:
             encrypted = rsaes_oaep.encrypt(public_key,
                                            sample.message,
                                            seed=sample.seed)
             self.assertEqual(sample.encrypted, encrypted)
Exemplo n.º 4
0
 def test_oaep_int_encryption(self):
     data = self.oaep_int_data
     encrypted = rsaes_oaep.encrypt(data.public_key, data.message, seed=data.seed)
     self.assertEqual(data.encrypted, encrypted)
Exemplo n.º 5
0
def test_oaep_int_encryption():
    data = oaep_int_data
    encrypted = rsaes_oaep.encrypt(data.public_key,
                                   data.message,
                                   seed=data.seed)
    assert data.encrypted == encrypted
Exemplo n.º 6
0
 def test_oaep_int_encryption(self):
     data = self.oaep_int_data
     encrypted = rsaes_oaep.encrypt(data.public_key,
                                    data.message,
                                    seed=data.seed)
     self.assertEqual(data.encrypted, encrypted)