public async Task <byte[]> Encrypt(byte[] data, string[] accessStructure) { await Setup(); var accessPolicy = new MockAttributes(accessStructure); var cipherText = await cpabeCenter.Encrypt(data, publicKey, accessPolicy); return(cipherText.Value); }
public override Attrib this[string attributeName] { get { if (!MockAttributes.ContainsKey(attributeName)) { MockAttributes.Add(attributeName, new MockAttrib(attributeName)); } return(MockAttributes[attributeName]); } }