Function rabe::schemes::bsw::encrypt [−][src]
pub fn encrypt(
_pk: &CpAbePublicKey,
_policy: &String,
_plaintext: &Vec<u8>,
_language: PolicyLanguage
) -> Result<CpAbeCiphertext, RabeError>
The encrypt algorithm of BSW CP-ABE. Generates a new CpAbeCiphertext using an Ac17PublicKey, an access policy given as String and some plaintext data given as u8.
Arguments
_pk
- A Public Key (PK), generated by the function setup()_policy
- An access policy given as JSON String_plaintext
- plaintext data given as a Vector of u8