Comments (5)
@nifrali : the error has something to do with the encryption key took from secret manager . Can you verify again your config.ts value especially on the section encryption for following parameters : defaultAlgorithm, keyPath and defaultVersion.
Those value should match with your secret value definition.
Good luck.
from opentrace-cloud-functions.
Hi Team,
I have the same problem. Even My encryption section "defaultAlgorithm, keyPath and defaultVersion" those parameters added properly. Previously it's was working as we expected.
OpenTrace team: Please give your input.
Thanks in advance :)
Please help me.
from opentrace-cloud-functions.
I had the same problem, I solved it changing the UID_SIZE parameter in getTempIDs.ts. The UID size is in fact 21 bytes long but when it is encrypted it starts coded as base64 that makes it appear longer. Obviously it changes the size of the final frame as well. In order to get the solution I used CyberChef to do the operations in both ways, encrypting and decrypting the tempId frame
https://gchq.github.io/CyberChef/
const decryptedB64 = customEncrypter.decodeAndDecrypt(payloadData, [UID_SIZE + 19, IV_SIZE, AUTHTAG_SIZE]); // <-- first field must be 40 bytes
. Moreover, I changed the CustomEncrypter.ts in the following parts of the code since it was not able to compile. Here my changes:
// @ts-ignore
//let plainText = decipher.update(cipherText, 'base64', 'base64'); <- it cannot be both the same according to the documentation**
let plainText = decipher.update(cipherText, 'base64', 'utf8'); // <-- my change was base64 to utf8
plainText += decipher.final('utf8'); // <-- final method also must be changed
return plainText;
}
let cipherText = cipher.update(dataB64, 'base64', 'base64'); // <-- original
let cipherText = cipher.update(dataB64, 'utf8', 'base64'); // <-- my change
cipherText += cipher.final('base64');
return [
cipherText,
iv.toString('base64'),
cipher.getAuthTag().toString('base64')
];
}`
Good luck!
from opentrace-cloud-functions.
Hi @jandresnc,
Thanks for the update. I have tried your solution but it is not working for me. Kindly suggest some other way to resolve this issue.
Other on the thread did you find any solution on the reported issue. Please help me.
Thanks in advance.
from opentrace-cloud-functions.
Hello @sethupathiramalingam , I suggest taking the encrption and decryption process step by step in your code, I did it showing with console.log all the steps in order to identify the part that was not according to the documentation, also I inspected the bytes lenght in each step. At the same time I took the message and I followed the same process using Cyberchef in order to compare the results, and when I detected the difference I got that solution. Maybe you could post one of your messages here to try to decrypt it and show you the steps.
from opentrace-cloud-functions.
Related Issues (20)
- how to implement processUploadedData HOT 1
- Testing without billing information HOT 1
- Analyst Uploaded data HOT 1
- How to get each unique Bluetooth ID HOT 1
- c
- Getting encryption key error HOT 1
- error: functions/lib/index.js does not exist, can't deploy Cloud Functions HOT 1
- Unhandled error { Error: 7 PERMISSION_DENIED: Missing or insufficient permissions. HOT 4
- Cloud Functions use-case? HOT 2
- getUploadToken: ERR_CRYPTO_INVALID_STATE HOT 7
- getEncryptionKeyTest { Error: 3 INVALID_ARGUMENT: Resource ID is not in a valid format HOT 4
- getUploadToken 401 HOT 8
- Error: firebase use must be run from a Firebase project directory. HOT 1
- NOT IDLE HOT 3
- error:- getting encryption key HOT 2
- processUploadedData: File is not streetPassRecords, ignore. HOT 5
- How to get user geo localisation ?
- getUploadToken. Error: 9 FAILED_PRECONDITION
- GetTempsIDs: Error: 500
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opentrace-cloud-functions.