AES Encryption between with derived key and IV not working in C# to Java

I have written code of AES encryption for Java for the code written by server developer but encryption not working between java and C#.

Java code-

public class EncyptionTest {

public static final String password = "testpassword";

private static final byte salt[] = new byte[] { 0x49, 0x76, 0x61, 0x6e,

0x20, 0x4d, 0x65, 0x64, 0x76, 0x65, 0x64, 0x65, 0x76 };

public int keyStrength = 384;

int iterationCount = 1000;

public static final int IV_LENGTH = 16;

public static final int KEY_LENGTH = 32;

public static void main(String args[]) {

try {

String text = "test data";

EncyptionTest encyptionTest = new EncyptionTest();

String encyptedText =...

Read More »

By: StackOverFlow - 7 days ago

Related Posts