aboutsummaryrefslogtreecommitdiff
path: root/cipher.sts
blob: 0f2047089120c447aa8f3caf379b1046773facdd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
; cipher is password string (pointer to start and length) and position in it

defword ciphernew
    0
exit

defword cipher ; ... passwd plen ppos key
    3 get 2 get + @ xor      ; key = key ^ passwd[ppos]
    over 1 + 3 get mod 2 set ; ppos = (ppos + 1) % plen
exit

defword cipherdel
    drop drop drop
exit