Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

254
Vistas
Ho do I run the Bouncy castle algorithm from Mirth Connect?

I have good examples on how to call the Bouncy Castle algorithm from Java. But I am new to Mirth and JavaScript. Please help me to translate the below java program to JavaScript?

Source: https://forums.mirthproject.io/forum...ncryption-help

public static byte[] encrypt(
    byte[] dataToEncrypt,
    char[] passPhrase,
    int algorithm,
    boolean armor
) throws IOException, PGPException, NoSuchProviderException
{
    ByteArrayOutputStream bOut = new ByteArrayOutputStream();

    OutputStream out = bOut;
    if (armor)
    {
        out = new ArmoredOutputStream(out);
    }

    PGPEncryptedDataGenerator encGen = new PGPEncryptedDataGenerator(new JcePGPDataEncryptorBuilder(algorithm).setSecureRan dom(new SecureRandom()).setProvider("BC"));
    encGen.addMethod(new JcePBEKeyEncryptionMethodGenerator(passPhrase).set Provider("BC"));

    OutputStream encOut = encGen.open(out, dataToEncrypt.length);

    encOut.write(dataToEncrypt);
    encOut.close();

    if (armor)
    {
        out.close();
    }

    return bOut.toByteArray();
}

byte[] encrypted = encrypt(dataToEncrypt, passArray, PGPEncryptedDataGenerator.CAST5, true);
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The link here points to a Javascript implementation of the said Algorithm. You can implement this within a transformer step of the source connector. Better still, you can compile the above code into a jar file that you can load to Mirth Connect's custom libs folder. A good starting point for working with custom Java codes is this

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda