Research Article
Data Access Control Based on Blockchain in Medical Cyber Physical Systems
Algorithm 1
The decision algorithm of access task matching.
| | Input: access task | | | , expected task | | | | | | Output: decision permit/reject | | (1) | permit null; | | (2) | reject null; | | (3) | Task ; | | (4) | forto Task.length do | | (5) | result Decision (Task [i], ); //Permission | | (6) | match | | (7) | if result is permitted then | | (8) | Task.delete (Task [i]); | | (9) | permit.add (Task [i].PID); | | (10) | end | | (11) | else if result is rejected then | | (12) | Task.delete (Task [i]); | | (13) | reject.add (Task [i].PID); | | (14) | end | | (15) | end | | (16) | return permit, reject; |
|