aboutsummaryrefslogtreecommitdiff
path: root/sts/cipher.sts
diff options
context:
space:
mode:
Diffstat (limited to 'sts/cipher.sts')
-rw-r--r--sts/cipher.sts12
1 files changed, 12 insertions, 0 deletions
diff --git a/sts/cipher.sts b/sts/cipher.sts
new file mode 100644
index 0000000..c87b67a
--- /dev/null
+++ b/sts/cipher.sts
@@ -0,0 +1,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