I have been experimenting with encrypting data in Ruby using OpenSSL and decrypting it in JavaScript using the JavaScript Forge library.
Although the method of distributing keys is functional for research purposes, I am encountering an issue where encrypting the same string with the same key in both languages results in different outputs, preventing successful encoding/decoding between the two.
Is there a recommended approach to resolve this discrepancy?
Additionally, transferring binary data strings from Ruby to JavaScript without encountering incompatible type errors necessitates conversion methods such as converting encrypted data to hexadecimal. However, manipulating this information in the forge library has proven to be challenging.