コード例 #1
0
        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);
        }
コード例 #2
0
        public override Attrib this[string attributeName]
        {
            get
            {
                if (!MockAttributes.ContainsKey(attributeName))
                {
                    MockAttributes.Add(attributeName, new MockAttrib(attributeName));
                }

                return(MockAttributes[attributeName]);
            }
        }