1 11 package org.eclipse.team.internal.ccvs.ssh; 12 13 public abstract class Cipher { 14 public abstract void decipher(byte[] src, int srcPos, byte[] dst, int dstPos, int len); 15 public abstract void encipher(byte[] src, int srcPos, byte[] dst, int dstPos, int len); 16 public static Cipher getInstance(String algorithm) { 17 try { 18 Class c = Class.forName("org.eclipse.team.internal.ccvs.ssh." + algorithm); return (Cipher) c.newInstance(); 20 } catch (Exception e) { 21 return null; 22 } 23 } 24 public abstract void setKey(byte[] key); 25 } 26 | Popular Tags |