blob: 14c6270d23b45127f9b5246f90c4fdf8ae663d1c [file] [log] [blame]
package org.eclipse.team.internal.ccvs.ssh;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
public abstract class Cipher {
public abstract void decipher(byte[] src, int srcPos, byte[] dst, int dstPos, int len);
public abstract void encipher(byte[] src, int srcPos, byte[] dst, int dstPos, int len);
public static Cipher getInstance(String algorithm) {
try {
Class c = Class.forName("org.eclipse.team.internal.ccvs.ssh." + algorithm); //$NON-NLS-1$
return (Cipher) c.newInstance();
} catch (Exception e) {
return null;
}
}
public abstract void setKey(byte[] key);
}