I would first verify that a specific plain text string gets encrypted to the exact same encrypted and encoded string in both environments. If not, then the algorithms are not compatible (perhaps due to differences in interpretation of the algorithm, or perhaps in one group 'tweaking' the algorithm to 'make it better'). If the encoded strings are not the same, you will have to try other algorithms until you find one that generates the same encoded string on both platforms.