Hi
Could anybody tell me what the equivalent .NET classes/methods are to the following Java methods:
decryptCipher = Cipher.getInstance("DES/ECB/PKCS5Padding");
decryptCipher.init(2, getKey(0));
decryptCipher.doFinal(data);
where getKey() returns an object of type SecretKeySpec (data is dummy):
public static Key getKey(int cipher) {
if (cipher == 0) {
return new SecretKeySpec(new byte[] { 1, 1, 1, 1, 1, 1, 1, 1 }, "DES");
}
return new SecretKeySpec(new byte[] { 2, 2, 2, 2, 2, 2, 2, 2 }, "DES");
}
Many thanks
Tony