Encryption is done is python & decryption to be done in Node js but facing following issues in JS
- I guess some characters are getting escape from string within JS like 'backslash', '_', ''
Expected - Python utf-8 string should match with Node JS String
Node js
var a = 'b22KTGxtQmtRei9CTEtUKy0OY1qefbey0brGbNYaskVbrdclYyXFlkqSnolziVDMEguUB5Xx7+9vix8UpwUn8uAbQvmW/uVRM7gRAO063i4tpPD2Ao3wrgapLQQBYnUo+aB2uS5t3a4jzldKq8OUVsY9QWXRJ28vTvJuOnyR6+bpN9yDaiMHP0rdI510PRetIw=='
var lenSize = Buffer.from(a, 'base64')
console.log(lenSize.toString().length)
Buffer size is 145 but toString length is 139
VS Python code
import base64
a = 'b22KTGxtQmtRei9CTEtUKy0OY1qefbey0brGbNYaskVbrdclYyXFlkqSnolziVDMEguUB5Xx7+9vix8UpwUn8uAbQvmW/uVRM7gRAO063i4tpPD2Ao3wrgapLQQBYnUo+aB2uS5t3a4jzldKq8OUVsY9QWXRJ28vTvJuOnyR6+bpN9yDaiMHP0rdI510PRetIw=='
lenSize = base64.b64decode(a)
print(len(lenSize))
Length is 145
Thanks in-advance...