With the Virgil CardEach Card contains attributes associated with the holder of the Private key and are used to prove the ownership of a Public key more ... created, we're ready to start encryptingEncryption is the process of encoding a message or information in such a way, that only authorized parties can access it more ... data which will then be stored in the encrypted storage. In this case we will encrypt some data for Alice, using her own Virgil Card.
In order to encrypt data, the user must search for Virgil Cards at Virgil ServicesVirgil Services is a group of cryptographic services that make up the Virgil Security infrastructure more ..., where all Virgil Cards are saved.
# search for Virgil Cards
alice_card = virgil.cards.find("alice")
data_buffer = VirgilBuffer.from_string("Some string")
# encrypt the buffer using found Virgil Cards
cipher_buffer = alice_card.encrypt(data_buffer)
See our guide on Finding Cards for best practices on loading Alice's card.
With this in place, Alice is now ready to store the encrypted files to a local or remote disk (Clouds).