delegationBasedOn static method

Future<Delegation> delegationBasedOn(
  1. Crypto localCrypto,
  2. String dataOwnerId,
  3. String delegatedTo,
  4. String objectId,
  5. String keyToEncrypt,
)

Implementation

static Future<Delegation> delegationBasedOn(Crypto localCrypto, String dataOwnerId,
    String delegatedTo, String objectId, String keyToEncrypt) async {
  return Delegation(
      owner: dataOwnerId,
      delegatedTo: delegatedTo,
      key: (await localCrypto.encryptAESKeyForHcp(dataOwnerId, delegatedTo, objectId, keyToEncrypt)).item1);
}