aboutsummaryrefslogtreecommitdiff
path: root/sts/cipher.sts
blob: c87b67a07a040f2ca616c77d4d41d4500f4ac52f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
defword cipher
    3 ref as cipher.byte
    2 get as cipher.password
    1 get as cipher.len
    0 get as cipher.pos
        cipher.pos @ word_size mul cipher.password + @
        cipher.byte @ xor
    cipher.byte !
    cipher.pos @ 0 = if cipher.len cipher.pos ! fi
    cipher.pos @ 1 - cipher.pos !
    drop drop drop
exit