Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9258217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:20:26+00:00 2026-06-18T12:20:26+00:00

I have a Node.js API. It has to make a SOAP call to a

  • 0

I have a Node.js API. It has to make a SOAP call to a “parent” API that includes one item encrypted via AES-192 (ECB) with a key. I’m trying to use the native crypto library, but the value I’m getting doesn’t match the value they’re expecting.

From the spec:

Encryption of the [string] is done using AES (NIST FIPS-197) 192 bit encryption using Hex encoding. It uses the ECB feedback mode with PKCS5Padding. Neither IV nor salting is used.

Frankly, I had to look most of that up and it still hasn’t helped. Aside from occasionally md5’ing something that didn’t need to be truly secure or perhaps sha’ing something that did, I’ve never done much with encryption so I’m a little stuck. Here’s what I have at this point:

var cipher = require( 'crypto' ).createCipher( 'aes192', datasources.api.auth.encryptionKey )
cipher.update( data.encryptable )
cipher.final( 'hex' )

I’ve tried a number of variants of input and output encoding in cipher.update(), but I haven’t been able to match the value that they’re expecting.

Can anyone more familiar with this stuff point me in the right direction? At this point, I’ve exhausted my own knowledge and have digressed into trial and error.

UPDATE

More of what I have so far:

var crypto  = require( 'crypto' );
var cipher  = crypto.createCipher( 'aes-192-ecb', datasources.api.auth.encryptionKey );
var crypted = cipher.update( 'DSS9676155', 'binary', 'hex' );
crypted     += cipher.final( 'hex' );

console.log( 'CRYPTED:  ' + crypted );
console.log( 'EXPECTED: 72989ABBE3D58AE582EF0EA669EDE521' );

Interestingly (?), I get the same crypted value (164fb25126c444031780c78d098fa877) no matter what combination of input and output encoding values I send to the update() method. That seems like a clear indication that I’ve done something very wrong, but I can’t see it.

UPDATE

Just received this from the API provider. They encrypt the text using Python as follows:

import sys
import chilkat

crypt = chilkat.CkCrypt2()

password = "thisIsWhereTheKeyGoes"

crypt.put_CryptAlgorithm("aes")
crypt.put_CipherMode("ECB")
crypt.put_KeyLength(192)
crypt.SetEncodedKey(password,"base64")

crypt.put_EncodingMode("hex")
text = "The string to be encrypted"

encText = crypt.encryptStringENC(text)

print encText

I’ve updated my code as follows:

var crypto    = require( 'crypto' );
var base64pwd = new Buffer( datasources.api.auth.encryptionKey ).toString( 'base64' );
var cipher    = crypto.createCipher( 'aes-192-ecb', base64pwd );
var crypted   = cipher.update( 'DSS9676155', 'utf8' );
crypted       += cipher.final( 'hex' );

console.log( 'CRYPTED:  ' + crypted );
console.log( 'EXPECTED: 72989ABBE3D58AE582EF0EA669EDE521' );

I still a different result from what’s expected. Again, I’ve tried several variants of in/output encoding.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T12:20:28+00:00Added an answer on June 18, 2026 at 12:20 pm

    For whatever it’s worth, I never got Node.js to kick back the same value that the provider expected. I ended up writing a Python script using the same process they use and had my Node app call it. It’s a total hack, but at least it works.

    Just wanted to put a wrapper on this question so it wasn’t left open forever.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Json response that I receive from an API call. It has
I have a project that makes some calls to Twitter's API from the node.js
I have module that implements custom content type via NodeAPI hooks ( hook_insert ,
Let me explain best with an example. Say you have node class that can
I have a node.js (v0.6.12) application that starts by evaluating a Javascript file, startup.js.
I have a node application that is not a web application - it completes
I have simple JavaScript code that is using the Ajax API for fetching a
I have been looking for a while a python module/API that does something I
I have problems streaming MP3 data via WebSocket with node.js and socket.io. Everything seems
I have a Node.js web server running on an embedded Linux system. For authentication

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.