Loading client-tests.fs +1 −1 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ UValue test# 0 to test# : >cache ( addr u -- addr' u' ) [: ." .cache" .test# ." /" type ;] $tmp ; : init-cache' ( -- ) "" >cache 1- file-status nip #-514 = IF "" >cache 1- file-status nip no-file# = IF "" >cache 1- $1FF =mkdir throw THEN ; Loading net2o-msg.fs +5 −5 Original line number Diff line number Diff line Loading @@ -42,8 +42,8 @@ Variable replay-mode : >chatid ( group u -- id u ) lastkey@ keyed-hash#128 ; : save-msgs ( group u -- ) otr-mode @ replay-mode @ or IF 2drop EXIT THEN init-chatlog enc-file $off n2o:new-msg >o otr-mode @ replay-mode @ or IF 2drop EXIT THEN init-chatlog enc-file $off n2o:new-msg >o 2dup msg-logs #@ bounds ?DO I $@ [: net2o-base:$, net2o-base:nestsig ;] gen-cmd$ enc-file $+! Loading @@ -58,7 +58,7 @@ Variable replay-mode : load-msg ( group u -- ) >chatid [: ." ~/.net2o/chats/" 85type ." .v2o" ;] $tmp 2dup file-status nip #-514 = ?EXIT 2dup file-status nip no-file# = ?EXIT vault>msg decrypt-file replay-mode off ; Loading net2o-tools.fs +4 −2 Original line number Diff line number Diff line Loading @@ -426,7 +426,9 @@ $10 Constant datesize# \ copy files : throw?exists ( throwcode -- ) dup #-514 <> and throw ; #-514 Constant no-file# : throw?exists ( throwcode -- ) dup no-file# <> and throw ; : >backup ( addr u -- ) 2dup 2dup [: type '~' emit ;] $tmp rename-file throw?exists Loading @@ -437,7 +439,7 @@ $10 Constant datesize# : >copy ( addr u -- fd ) 2dup >new { fd1 } r/o open-file dup #-514 = IF r/o open-file dup no-file# = IF 2drop ELSE throw 0 { fd0 w^ cpy } Loading net2o-vault.fs +1 −1 Original line number Diff line number Diff line Loading @@ -110,7 +110,7 @@ Variable key-list vaultkey $100 erase enc-mode @ $FF and $20 - rng$ vkey state# move-rep key( ." vkey: " vkey state# 85type forth:cr ) enc-mode @ dup lit, vault-crypt 8 rshift $FF and >crypt enc-mode @ dup ulit, vault-crypt 8 rshift $FF and >crypt [: [: drop vsk swap keygendh ed-dh 2>r vkey vaultkey $10 + enc-mode @ $FF and $20 - move vaultkey enc-mode @ $FF and 2r> encrypt$ Loading Loading
client-tests.fs +1 −1 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ UValue test# 0 to test# : >cache ( addr u -- addr' u' ) [: ." .cache" .test# ." /" type ;] $tmp ; : init-cache' ( -- ) "" >cache 1- file-status nip #-514 = IF "" >cache 1- file-status nip no-file# = IF "" >cache 1- $1FF =mkdir throw THEN ; Loading
net2o-msg.fs +5 −5 Original line number Diff line number Diff line Loading @@ -42,8 +42,8 @@ Variable replay-mode : >chatid ( group u -- id u ) lastkey@ keyed-hash#128 ; : save-msgs ( group u -- ) otr-mode @ replay-mode @ or IF 2drop EXIT THEN init-chatlog enc-file $off n2o:new-msg >o otr-mode @ replay-mode @ or IF 2drop EXIT THEN init-chatlog enc-file $off n2o:new-msg >o 2dup msg-logs #@ bounds ?DO I $@ [: net2o-base:$, net2o-base:nestsig ;] gen-cmd$ enc-file $+! Loading @@ -58,7 +58,7 @@ Variable replay-mode : load-msg ( group u -- ) >chatid [: ." ~/.net2o/chats/" 85type ." .v2o" ;] $tmp 2dup file-status nip #-514 = ?EXIT 2dup file-status nip no-file# = ?EXIT vault>msg decrypt-file replay-mode off ; Loading
net2o-tools.fs +4 −2 Original line number Diff line number Diff line Loading @@ -426,7 +426,9 @@ $10 Constant datesize# \ copy files : throw?exists ( throwcode -- ) dup #-514 <> and throw ; #-514 Constant no-file# : throw?exists ( throwcode -- ) dup no-file# <> and throw ; : >backup ( addr u -- ) 2dup 2dup [: type '~' emit ;] $tmp rename-file throw?exists Loading @@ -437,7 +439,7 @@ $10 Constant datesize# : >copy ( addr u -- fd ) 2dup >new { fd1 } r/o open-file dup #-514 = IF r/o open-file dup no-file# = IF 2drop ELSE throw 0 { fd0 w^ cpy } Loading
net2o-vault.fs +1 −1 Original line number Diff line number Diff line Loading @@ -110,7 +110,7 @@ Variable key-list vaultkey $100 erase enc-mode @ $FF and $20 - rng$ vkey state# move-rep key( ." vkey: " vkey state# 85type forth:cr ) enc-mode @ dup lit, vault-crypt 8 rshift $FF and >crypt enc-mode @ dup ulit, vault-crypt 8 rshift $FF and >crypt [: [: drop vsk swap keygendh ed-dh 2>r vkey vaultkey $10 + enc-mode @ $FF and $20 - move vaultkey enc-mode @ $FF and 2r> encrypt$ Loading