Function rabe::schemes::mke08::encrypt [−][src]
pub fn encrypt(
_pk: &Mke08PublicKey,
_attr_pks: &Vec<Mke08PublicAttributeKey>,
_policy: &String,
_language: PolicyLanguage,
_plaintext: &[u8]
) -> Result<Mke08Ciphertext, RabeError>
The encrypt algorithm of MKE08. Generates an Mke08Ciphertext using an Mke08PublicKey, a Vector of Mke08PublicAttributeKeys, an access policy given as String as well as some plaintext data given as u8.
Arguments
_pk
- A Public Key (PK), generated by the function setup()_attr_pks
- A Vector of all Mke08PublicAttributeKey that are involded in the policy_policy
- An access policy given as JSON String_plaintext
- plaintext data given as a Vector of u8