Function rabe::schemes::aw11::encrypt [−][src]
pub fn encrypt(
_gk: &Aw11GlobalKey,
_pks: &Vec<Aw11PublicKey>,
_policy: &String,
_language: PolicyLanguage,
_plaintext: &[u8]
) -> Result<Aw11Ciphertext, RabeError>
This function encrypts plaintext data using a given JSON String policy and produces a 'Aw11Ciphertext' if successfull.
Arguments
_gk
- A Global Parameters Key (GK), generated by setup()_pk
- A Public Parameters Key (MK), associated with an authority and generated by authgen()_policy
- A JSON String policy describing the access rights_plaintext
- The plaintext data given as a Vector of u8.