1 package org.ibex.crypto;
5 private final byte[] s = new byte[256];
9 for(int i=0;i<256;i++) s[i] = (byte)i;
10 for(int i=0,j=0;i<256;i++) {
11 j = (j + (s[i]&0xff) + (k[i%k.length]&0xff))&0xff;
18 public void process(byte[] in, int ip, byte[] out, int op, int len) {
22 for(int i=0;i<len;i++) {
24 y = (y + (s[x]&0xff)) & 0xff;
28 int t = ((s[x]&0xff) + (s[y]&0xff))&0xff;
30 out[op+i] = (byte)((in[ip+i]&0xff)^k);