1 package com.daffodilwoods.daffodildb.server.datasystem.encryptdecrypt; 2 3 public abstract class EDStreamCipher extends EDCipher 4 { 5 6 public EDStreamCipher(int i) 7 { 8 super(i); 9 } 10 11 public abstract byte encrypt(byte byte0); 12 13 public abstract byte decrypt(byte byte0); 14 15 public void encrypt(byte abyte0[], byte abyte1[]) 16 { 17 encrypt(abyte0, 0, abyte1, 0, abyte0.length); 18 } 19 20 public void decrypt(byte abyte0[], byte abyte1[]) 21 { 22 decrypt(abyte0, 0, abyte1, 0, abyte0.length); 23 } 24 25 public void encrypt(byte abyte0[], int i, byte abyte1[], int j, int k) 26 { 27 for(int l = 0; l < k; l++) 28 abyte1[j + l] = encrypt(abyte0[i + l]); 29 30 } 31 32 public void decrypt(byte abyte0[], int i, byte abyte1[], int j, int k) 33 { 34 for(int l = 0; l < k; l++) 35 abyte1[j + l] = decrypt(abyte0[i + l]); 36 37 } 38 } 39 | Popular Tags |