Agent SDK
ionicsdk.secretshare.SecretShareData Class Reference

Secret Share data implementation. More...

Inheritance diagram for ionicsdk.secretshare.SecretShareData:

Detailed Description

Secret Share data implementation.

This class manages access to the secret share data. This data consists of a dictionary of key-values and a list of buckets. Each bucket groups keys from the dictionary and assigns a threshold count - the number of keys in each bucket that must match in order to decrypt.

The user must subclass this one and implement a GetData() and a GetBuckets() method. These methods are called on the Python side from 'C' callbacks, and this class converts the Python data into native 'C' data for the SDK.

def GetData() should return a dictionary of string keys to string values

def GetBuckets() should return a list (or tuple) of SecretShareBucket objects.

Example:

class SecretShareFoo(ionicsdk.SecretShareData): def GetData(self): return {"key1":"value1"} def GetBuckets(self): secretShareBucket = ionicsdk.SecretShareBucket() secretShareBucket.append("key1") secretShareBucket.SetThreshold(1) return (secretShareBucket,)

It is assumed the data returned is volatile and should be re-queried on any access to a key.


The documentation for this class was generated from the following file: