CryptoStrategies class

Constructors

CryptoStrategies.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dataOwnerRequiresAnonymousDelegation(CryptoActorStubWithType dataOwner, String? groupId) Future<bool>
Specifies if a data owner requires anonymous delegations, i.e. his id should not appear unencrypted in new secure delegations. This should always be the case for patient data owners. @param dataOwner a data owner. @param groupId the id of the data owner's group, or null if the data owner is in the same group as the current user @return true if the delegations for the provided data owner should be anonymous.
generateNewKeyForDataOwner(DataOwnerWithType self) Future<KeyGenerationRequestResult>
The correct initialisation of the crypto API requires that at least 1 verified (or device) key pair is available for each data owner part of the current data owner hierarchy. If no verified key is available for any of the data owner parents the api initialisation will automatically fail, however if there is no verified key for the current data owner you can instead create a new crypto key. @param self the current data owner. @param cryptoPrimitives cryptographic primitives you can use to support the process. @return an instance of KeyGenerationRequestResult specifying how the SDK should behave. @throws Exception you can throw any exception, and it will simply propagate to the api initialisation method.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyNewKeyCreated(CardinalApis apis, CardinalRsaPrivateKey key) Future<void>
Notifies that a new key for the current data owner was created. This method is called after the initialization of the other SDK apis. @param apis the initialized cardinal apis. @param key the newly created key. @param cryptoPrimitives cryptographic primitives you can use to support the process.
recoverAndVerifySelfHierarchyKeys(List<KeyDataRecoveryRequest> keysData, KeyPairRecoverer keyPairRecoverer) Future<Map<String, RecoveredKeyData>>
Method called during initialisation of the crypto API to validate keys recovered through iCure's recovery methods and/or to allow recovery of missing keys using means external to iCure. On startup the iCure sdk will try to load all keys for the current data owner and its parent hierarchy: if the sdk can't find some of the keys for any of the data owners (according to the public keys for the data owner in the iCure server) and/or the sdk could recover some private keys but can't verify the authenticity of the key pairs this method will be called. The recovered and verified keys will automatically be cached using the current api {@link KeyStorageFacade} and {@link StorageFacade}
toString() String
A string representation of this object.
inherited
verifyDelegatePublicKeys(CryptoActorStubWithType delegate, List<CardinalRsaPublicKey> publicKeys, String? groupId) Future<List<CardinalRsaPublicKey>>
Verifies if the public keys of a data owner which will be the delegate of a new exchange key do actually belong to the person the data owner represents. This method is not called when the delegate would be the current data owner for the api.

Operators

operator ==(Object other) bool
The equality operator.
inherited