Esempio 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)
Esempio 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
Esempio 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)
Esempio 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)
Esempio 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
Esempio 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)