;暗号化 #module #deffunc encode val,int,int mref date,32 mref pkey,1 mref xkey,2 strlen len,date repeat len peek code,date,cnt code=code+pkey\256^xkey poke date,cnt,code loop return #deffunc decode val,int,int mref date,32 mref pkey,1 mref xkey,2 strlen len,date repeat len peek code,date,cnt code=code^xkey-pkey if code<0 : code=256+code poke date,cnt,code loop return #global #define pkey 89 ;+演算用のキー #define xkey 39 ;xor演算用のキー string="0123456789abcdefghijklmnopqrstuvwxyz" mes "初期文字列\n"+string encode string,pkey,xkey mes "エンコード後\n"+string decode string,pkey,xkey mes "デコード後\n"+string stop |