Function rabe::schemes::lsw::encrypt[][src]

pub fn encrypt(
    _pk: &KpAbePublicKey,
    _attributes: &Vec<String>,
    _plaintext: &[u8]
) -> Option<KpAbeCiphertext>

The encrypt algorithm of LSW KP-ABE. Generates a new KpAbeCiphertext using an KpAbePublicKey, a set of attributes given as String Vector and some plaintext data given as u8.

Arguments

  • _pk - A Public Key (PK), generated by the function setup()
  • _attributes - A set of attributes given as String Vector
  • _plaintext - plaintext data given as a Vector of u8