Research Article
Blockchain Ecosystem for Credit Transfer in Education
| | Contract SecureMath | | | Function secAdd | | | Pass In: unsigned integer A and unsigned integer B | | | Add A and B and pass value to C | | | Require C to be greater than or equal to A | | | Pass Out: unsigned integer C | | | Endfunction | | | Function secSub | | | Pass In: unsigned integer A and unsigned integer B | | | Subtract B and A and pass value to C | | | Require B to be lesser than or equal to A | | | Pass Out: unsigned integer C | | | Endfunction | | | Function secMul | | | Pass In: unsigned integer A and unsigned integer B | | | Multiply A and B and pass value to C | | | Require A to be equal to or C/A equal to B | | | Pass Out: unsigned integer C Endfunction | | | Function secDiv | | | Pass In: unsigned integer A and unsigned integer B | | | Divide A and B and pass value to C | | | Require B to be greater than 0 | | | Pass Out: unsigned integer C | | | Endfunction |
|