Algorithm 2 Telemetry Data Hash |
function SendRequestData
Current datetime
Request headers as dictionary
‘N/A’
Initialize database cursor
if Request method is ‘POST’ then
Retrieve telemetry data between interaction start and current timestamp
Fetched data
if is not empty then
Initialize , , ,
for each entry d in do
if is ‘mouse’ then
Append mouse coordinates to
else if is ‘keyboard’ then
Add to
end if
end for
Calculate average time between key presses
Append average time to
Compute hash of
end if
Insert request data into the database
end if
Commit changes to the database
Close database connection
end function
|