Ejemplo n.º 1
0
def test_asymetric():
    bob = get_ecc(b'secret2')

    # enc / dec
    plaintext = b"Hello Bob"
    ciphertext = crypto.encrypt(plaintext, bob.raw_pubkey)
    assert bob.decrypt(ciphertext) == plaintext
Ejemplo n.º 2
0
def test_asymetric():
    bob = get_ecc('secret2')

    # enc / dec
    plaintext = "Hello Bob"
    ciphertext = crypto.encrypt(plaintext, bob.raw_pubkey)
    assert bob.decrypt(ciphertext) == plaintext