Comments (11)
thanks
from opentrace-android.
Can you please use a valid title and explain your issue in the "description" section?
from opentrace-android.
ok
from opentrace-android.
how to know the phone number or the uid of the users in this data uploaded
from opentrace-android.
How did you manage to get the upload PIN? @russellmoya
from opentrace-android.
@russellmoya you can download uploaded file by ObjectMetadata and decode msg (where contains encoded contacted user id) from the records list and token (where contains encoded user id who uploaded data). But your token is empty and it seems you are avoided getToken process.
from opentrace-android.
Thanks a lot @rinekri for answer me.
i remove the token , but in the original code , i have the token . @rinekri .
i have Encryption secret key , that i store in google cloud secret manager .
but i want know how to decode msg and token
@russellmoya you can download uploaded file by ObjectMetadata and decode msg (where contains encoded contacted user id) from the records list and token (where contains encoded user id who uploaded data). But your token is empty and it seems you are avoided getToken process.
from opentrace-android.
@russellmoya you can use decryptTempID and validateToken functions to do this. You can find them in the existing files: first / second. For encryptionKey parameter use await getEncryptionKey()
from opentrace-android.
How did you manage to get the upload PIN? @russellmoya
i modify getUploadToken.ts file .
in the getUploadToken.ts , i change if (data) code .
the new code :
if (data) {
//const uploadCodes = await retrieveUploadCodes();
const uploadCodes = uid.substring(0, 6).toUpperCase();
console.log('getUploadToken:', obtained ${uploadCodes.length} upload codes
);
console.log("voici le code de retrive",uploadCodes);
if(uploadCodes.length >0){
if(uploadCodes === data.toUpperCase()){
valid = true ;
} else {
valid = false ;
}
}
// valid = uploadCodes.find(x => x === data) !== undefined;
console.log('getUploadToken:', data is ${valid ? 'valid' : 'not valid'} code
);
}
from opentrace-android.
@russellmoya you can use decryptTempID and validateToken functions to do this. You can find them in the existing files: first / second. For encryptionKey parameter use await getEncryptionKey()
for msg i use descyptTempID and for token i use validateToken ? ... @rinekri
from opentrace-android.
@rinekri yeah. This is an example how you can download uploaded data to decrypt it:
async function getCurrentUploadedData(event: ObjectMetadata): Promise<UploadedData> {
return admin.storage().bucket(event.bucket).file(event.name!).download().then(file => {
const uploadedData = JSON.parse(file[0].toString())
console.log('getUploadedData:', `Uploaded data token: ${uploadedData.token}`);
return uploadedData
}).catch(function (error) {
console.log("getUploadedData", error);
return null
})
}
interface UploadedData {
records: Record[];
token: string
}
interface Record {
id: string,
msg: string,
timestamp: string
}
from opentrace-android.
Related Issues (20)
- Invalid Code HOT 2
- Task :app:processDebugGoogleServices FAILED HOT 2
- OTP imple HOT 1
- Decrypt msg to uid HOT 4
- Lower minSdk from 22 to 21 HOT 1
- Location permission on Android HOT 1
- StreetPassRecords Always Empty when uploaded HOT 1
- f-droid.org repository HOT 4
- [urgent] CVE-2020-12856
- android configuration HOT 2
- Bluetooth permission and enabling
- Android device didn't find ios device
- BLE scanner may not work without location enabled
- Tech report on app privacy
- Records empty (I didn't change UUID)
- BuildConfig.java (unclosed string literal public static final String VERSION_NAME
- Can not Upload Data HOT 1
- error for unknown property HOT 1
- error unknown property of object type in android studio HOT 1
- App foreground service not restarting after reboot
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-android.