Пример #1
0
    def from_dict(cls, D):
        D = D.copy()
        for name in {"n", "e", "d"}:
            if name not in D:
                continue

            D[name] = base64_to_int(D[name])

        return super(RSAKey, cls).from_dict(D)
Пример #2
0
 def test_base64_to_int(self):
     self.assertEqual(utils.base64_to_int(b'AQAB'), 65537)