Function rabe::schemes::ac17::cp_encrypt [−][src]
pub fn cp_encrypt(
pk: &Ac17PublicKey,
policy: &String,
plaintext: &[u8],
language: PolicyLanguage
) -> Result<Ac17CpCiphertext, RabeError>
The encrypt algorithm of AC17CP. Generates an Ac17CpCiphertext 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 Stringplaintext
- plaintext data given as a Vector of u8