def test_gen_keypair_if_needed(): new_dec_keypair = keypairs.DecryptingKeypair() assert new_dec_keypair._privkey is not None assert new_dec_keypair.pubkey is not None assert new_dec_keypair.pubkey == new_dec_keypair._privkey.get_pubkey() new_sig_keypair = keypairs.SigningKeypair() assert new_sig_keypair._privkey is not None assert new_sig_keypair.pubkey is not None assert new_sig_keypair.pubkey == new_sig_keypair._privkey.get_pubkey()
def get_decrypting_power_from_label(self, label): label_privkey = self._get_privkey_from_label(label) label_keypair = keypairs.DecryptingKeypair(private_key=label_privkey) decrypting_power = DecryptingPower(keypair=label_keypair) return decrypting_power