Thanks for your reply,
It is working for normal cases but we have different issues.
I created database using the following byte array as key from old library.
byte[] keyArray = { 0x3D, 0x40, 0xA2, 0xE0, 0xC8, 0x25, 0x2C, 0x7C, 0xAC, 0x93, 0x09, 0xCF, 0x4B, 0x87, 0xCD, 0xAA, 0xED, 0xF7, 0xF9, 0xD4, 0x0D, 0x59, 0x0C, 0xF7, 0x7E, 0x34, 0xA6, 0xC9, 0xF5, 0xB9, 0x62, 0x27, 0x2F, 0x95, 0x4C, 0x27, 0x56, 0x91, 0xE9, 0x45, 0x28, 0xAB, 0x3F, 0x5A, 0x2C, 0x79, 0xB2, 0xEF };
But when I not able to open the database using the new library using the string key created generated by the method Encoding.UTF8.GetString .
After a few attempts, I tried to check the byte array generated from the String is different from the original key.
eg:
var tempkeyArray = Encoding.UTF8.GetBytes(Encoding.UTF8.GetString(keyArray));
Output:
tempkeyArray =
{3D, 0x40, 0xEF, 0xBF, 0xBD, 0xEF, 0xBF, 0xBD, 0xEF, 0xBF, 0xBD, 0x25, 0x2C, 0x7C, 0xEF, 0xBF, 0xBD, 0xEF, 0xBF, 0xBD, 0x09, 0xEF, 0xBF, 0xBD, 0x4B, 0xEF, 0xBF, 0xBD, 0xCD, 0xAA, 0xEF, 0xBF, 0xBD, 0xEF, 0xBF, 0xBD, 0xEF, 0xBF, 0xBD, 0xEF, 0xBF, 0xBD, 0x0D, 0x59, 0x0C, 0xEF, 0xBF, 0xBD, 0x7E, 0x34, 0xEF, 0xBF, 0xBD, 0xEF, 0xBF, 0xBD, 0xEF, 0xBF, 0xBD, 0xEF, 0xBF, 0xBD, 0x62, 0x27, 0x2F, 0xEF, 0xBF, 0xBD, 0x4C, 0x27, 0x56, 0xEF, 0xBF, 0xBD, 0xEF, 0xBF, 0xBD, 0x45, 0x28, 0xEF, 0xBF, 0xBD, 0x3F, 0x5A, 0x2C, 0x79, 0xEF, 0xBF, 0xBD, 0xEF, 0xBF, 0xBD}
All the bolded byte in keyArray is replaced with 0xEF, 0xBF, 0xBD in tempkeyArray.
Since the bytes are different, new API are not able to open the database.
Could you help me to point any api or workaround to handle this issue?