checkid(){ grep -m 1 -xE '[0-9a-zA-Z:=]{16}'; }
+transid(){
+ # transaction ID to modify a given file
+ local file="$1"
+ { stat -c %F%i%n%N%s%Y "$file" 2>&-
+ printf %s "$SESSION_ID"
+ server_key
+ } | sha256sum | cut -d\ -f1
+}
+
update_session(){
local session sid time sig serverkey checksig