Commit 3bb2cd52 authored by Cypres TAC's avatar Cypres TAC
Browse files

add LTKey test

parent 907dd284
Pipeline #236876 passed with stages
in 7 minutes and 58 seconds
......@@ -6,12 +6,12 @@
#include "clea.h"
static uint32_t t_periodStart; // Starting time of the period, NTP UTC timestamp limited to the 32-bit seconds field (starting at a round hour)
static uint8_t LTKey[SHA256_DIGEST_SIZE]; // Temporary location secret key
uint8_t LTKey[SHA256_DIGEST_SIZE]; // Temporary location secret key
static uint8_t LTId[16]; // Temporary location public universally unique Identifier
static const uint8_t version = 0;
static const uint8_t qrType = 0;
static void compute_TLKey(void);
static void compute_LTKey(void);
static void to_base64(uint8_t *in, uint8_t *out, uint8_t n);
static uint32_t get_ntp_utc(bool round);
......@@ -24,7 +24,7 @@ int32_t clea_start_new_period(uint8_t ptr_LTId[16], uint32_t *ptr_ct_periodStart
{
t_periodStart = get_ntp_utc(true);
compute_TLKey();
compute_LTKey();
// Compute LTId
hmac_sha256_128(LTKey, sizeof(LTKey), (uint8_t *)"1", 1, LTId);
......@@ -139,7 +139,7 @@ int32_t clea_renew_qrcode(uint32_t *ptr_ct_periodStart, uint32_t *ptr_t_qrStart)
return 0;
}
static void compute_TLKey(void)
static void compute_LTKey(void)
{
static uint8_t buffer[64]; // 512-bit input data buffer
uint8_t i;
......
......@@ -2,6 +2,7 @@
#define CLEA_H__
#include <stdint.h>
#include "hash/sha256.h"
#define SK_L_SIZE (51)
......@@ -43,6 +44,8 @@ extern clea_conf_t clea_conf;
#define LSP_BASE64_SIZE (237)
extern uint8_t LSP_base64[LSP_BASE64_SIZE];
extern uint8_t LTKey[SHA256_DIGEST_SIZE]; // Temporary location secret key
void clea_init(void);
int32_t clea_start_new_period(uint8_t ptr_LTId[16], uint32_t *ptr_ct_periodStart, uint32_t *ptr_t_qrStart);
......
......@@ -29,6 +29,15 @@ void print_uuid(uint8_t uuid[16])
uuid[8], uuid[9], uuid[10], uuid[11], uuid[12], uuid[13], uuid[14], uuid[15]);
}
void print_hex(uint8_t key[SHA256_DIGEST_SIZE])
{
for (int i = 0; i < SHA256_DIGEST_SIZE; i++)
{
printf("%02x", key[i]);
}
}
void usage(char *s, char *err)
{
printf("ERROR: %s\n\n", err);
......@@ -90,7 +99,9 @@ int main(int argc, char *argv[])
printf("=VALUES=");
print_qrcode();
print_uuid(LTId);
printf(" %lu %lu\n",ct_periodStart, t_qrStart);
printf(" %lu %lu ",ct_periodStart, t_qrStart);
print_hex(LTKey);
printf("\n");
}
else
{
......
......@@ -3,6 +3,7 @@ package fr.inria.clea.lsp;
import java.time.Instant;
import java.time.temporal.ChronoUnit;
import fr.devnied.bitlib.BytesUtils;
import fr.inria.clea.lsp.Location.LocationBuilder;
import fr.inria.clea.lsp.exception.CleaCryptoException;
import fr.inria.clea.lsp.utils.TimeUtils;
......@@ -37,10 +38,11 @@ public class LspEncoderDecoder {
String manualContactTracingAuthoritySecretKey = args[3];
LocationSpecificPartDecoder lspDecoder = new LocationSpecificPartDecoder(serverAuthoritySecretKey);
LocationSpecificPart lsp = lspDecoder.decrypt(lspBase64);
String valuesToreturn = "=VALUES="+ (lsp.isStaff()? 1 : 0) + " " + lsp.getQrCodeRenewalIntervalExponentCompact() + " " + lsp.getVenueType();
valuesToreturn += " " + lsp.getVenueCategory1() + " " + lsp.getVenueCategory2() + " " + lsp.getPeriodDuration() + " " + lsp.getLocationTemporaryPublicId();
valuesToreturn += " " + Integer.toUnsignedString(lsp.getCompressedPeriodStartTime()) + " " + TimeUtils.ntpTimestampFromInstant(lsp.getQrCodeValidityStartTime());
valuesToreturn += " " + BytesUtils.bytesToStringNoSpace(lsp.getLocationTemporarySecretKey()).toLowerCase();
if (lsp.isLocationContactMessagePresent()) {
LocationContactMessageEncoder contactMessageDecode = new LocationContactMessageEncoder(manualContactTracingAuthoritySecretKey);
......@@ -90,11 +92,13 @@ public class LspEncoderDecoder {
location.getLocationSpecificPart().setQrCodeValidityStartTime(Instant.now().truncatedTo(ChronoUnit.HOURS));
String encryptedLocationSpecificPart = location.getLocationSpecificPartEncryptedBase64();
String LTKey = BytesUtils.bytesToStringNoSpace(location.getLocationSpecificPart().getLocationTemporarySecretKey()).toLowerCase();
final String valuesToreturn = "=VALUES=" + encryptedLocationSpecificPart + " "
+ location.getLocationSpecificPart().getLocationTemporaryPublicId() + " "
+ Integer.toUnsignedString(location.getLocationSpecificPart().getCompressedPeriodStartTime()) + " "
+ TimeUtils.ntpTimestampFromInstant(location.getLocationSpecificPart().getQrCodeValidityStartTime());
+ TimeUtils.ntpTimestampFromInstant(location.getLocationSpecificPart().getQrCodeValidityStartTime()) + " "
+ LTKey ;
System.out.println(valuesToreturn);
}
......
......@@ -203,7 +203,8 @@ class LocationSpecificPartTest {
@CsvFileSource(resources = "/testLSPDecoding.csv", numLinesToSkip = 1)
public void testDecodingOfLocationSpecificPartInBase64(int staff, String locationTemporaryPublicID,
int qrCodeRenewalIntervalExponentCompact, int venueType, int venueCat1, int venueCat2, int periodDuration,
int periodStartTime, long qrStartTime, String serverAuthoritySecretKey, String serverAuthorityPublicKey,
int periodStartTime, long qrStartTime, String locationTemporarySecretKey,
String serverAuthoritySecretKey, String serverAuthorityPublicKey,
String lspbase64) throws CleaEncryptionException, CleaEncodingException {
LocationSpecificPartDecoder decoder = new LocationSpecificPartDecoder(serverAuthoritySecretKey);
LocationSpecificPart lsp = decoder.decrypt(lspbase64);
......@@ -216,6 +217,8 @@ class LocationSpecificPartTest {
assertThat(lsp.getVenueCategory1()).isEqualTo(venueCat1);
assertThat(lsp.getVenueCategory2()).isEqualTo(venueCat2);
assertThat(lsp.getCompressedPeriodStartTime()).isEqualTo(periodStartTime);
String lsp_locationTemporarySecretKey = BytesUtils.bytesToStringNoSpace(lsp.getLocationTemporarySecretKey()).toLowerCase();
assertThat(lsp_locationTemporarySecretKey).isEqualTo(locationTemporarySecretKey);
assertThat(lsp.getQrCodeValidityStartTime()).isEqualTo(TimeUtils.instantFromTimestamp(qrStartTime));
}
......@@ -228,8 +231,8 @@ class LocationSpecificPartTest {
@CsvFileSource(resources = "/testLSPDecoding.csv", numLinesToSkip = 1)
public void testEncodingDecodingOfLSPSpecificPartInBase64(int staff,
String locationTemporaryPublicID, int qrCodeRenewalIntervalExponentCompact, int venueType, int venueCat1,
int venueCat2, int periodDuration, int periodStartTime, long qrStartTime, String serverAuthoritySecretKey,
String serverAuthorityPublicKey, String lspbase64) throws CleaCryptoException {
int venueCat2, int periodDuration, int periodStartTime, long qrStartTime, String locationTemporarySecretKey,
String serverAuthoritySecretKey, String serverAuthorityPublicKey, String lspbase64) throws CleaCryptoException {
/* Use only testLSPDecoding.csv parameters to have a variety of parameters */
/* times parameters and location are generated */
Instant myPeriodStartTime = Instant.now().truncatedTo(ChronoUnit.HOURS);
......
staff, LTId, CRIexp, venueType, venueCat1, venueCat2, periodDuration, ct_periodStart, t_qrStart, SK_SA, PK_SA, lsp_base64
0, c793a189-bb16-312b-8142-b023ddc0af17, 5, 12, 0, 0, 3, 1063102, 3827167734, 34af7f978c5a17772867d929e0b800dd2db74608322d73f2f0cfd19cdcaeccc8, 04c14d9db89a3dd8da8a366cf26cd67f1de468fb5dc15f240b0d2b96dbdb5f39af962cb0bdc0bafcc9e523bf5cd4eba420c51758f987457954d32f1003bbaaf1c5, AMeToYm7FjErgUKwI93ArxfjH9TKDsTE_Xc9Yb68IMcYw1pSGTGRawj4u2wFRS9biYOC7_oOdevJCNK0UsDlkmUlFv5azDeHl5Qxy9a0C0Zo7-AAnandO74jXm_JUfeU8lSYosCSOSrm3cOtXzx3d_E-pmVNOkSuurc-P50pvuTeu3k17BAeSqO5YrhTqwL-AFMKdKjadwQrdLY_NTBl54WwFfkqNFol4haLNQtORA==
1, c793a189-bb16-312b-8142-b023ddc0af17, 31, 31, 15, 15, 255, 1063102, 3827167734, 34af7f978c5a17772867d929e0b800dd2db74608322d73f2f0cfd19cdcaeccc8, 04c14d9db89a3dd8da8a366cf26cd67f1de468fb5dc15f240b0d2b96dbdb5f39af962cb0bdc0bafcc9e523bf5cd4eba420c51758f987457954d32f1003bbaaf1c5, AMeToYm7FjErgUKwI93ArxdXNAHI0NLHUQNejUy7w2vXLrdlgVnO9D9wMs9WIfFG1jYAmfjs3ywzFdLugnmycuxF72TPipxTmPngknkbQy2rMNEgJT6a3-QXT98yUeDReLCnTgkdgK-UXBD4dtnSh-H2eILIM01_cqJtokaKOQzNFl0CDu50wZIsH3ufmgOr8-yE7zn-1BmCKiS9i_sISeCefYVGaoEyhRjedp0orA==
1, c793a189-bb16-312b-8142-b023ddc0af17, 31, 31, 15, 15, 255, 1063102, 3827167734, 3108f08b1485adb6f72cfba1b55c7484c906a2a3a0a027c78dcd991ca64c97bd, 045f802c016b2d14ef4d7ef01617c67c7506c0cd08aed3e4bcaf34ef5ffaddebb70a073d82c37bc874ce6705cec8b1c4a03b2ccd8f28b0c5034fb8774f2e97b1a4, AMeToYm7FjErgUKwI93Arxdml1y0xhCFK0drHc9178cijVF--8i3pHmRkHcxVcjVnHHTbCsifrp8h3fKJEE5neHf_HYDyWBHzIJTBEoCcRSIe0j2VYKbh_yuV17Grx9VyMteV9YInu_rO7Tf9lU=
0, c793a189-bb16-312b-8142-b023ddc0af17, 5, 10, 3, 3, 5, 1063102, 3827167734, 34af7f978c5a17772867d929e0b800dd2db74608322d73f2f0cfd19cdcaeccc8, 04c14d9db89a3dd8da8a366cf26cd67f1de468fb5dc15f240b0d2b96dbdb5f39af962cb0bdc0bafcc9e523bf5cd4eba420c51758f987457954d32f1003bbaaf1c5, AMeToYm7FjErgUKwI93Arxf1v4Wrs-OfKKZh6BHvSGCkqtvHQHFE04Tj5C0h0_wvoU9LAD6zuN3SjGLf6a_tNgXwFB4GH_81-ehBjd5CbHZlBnBH_oW81G7YDhqCSOEVk6H97yh1icUCZY-qvNiOD0e6TPryhS6hzmN1sYgykbTilF3thEtCMQLM6WS8BgK7zJFrx9tvu224l5HDpBfOGIoM_tKBFIRPor9Tidhe5A==
1, c793a189-bb16-312b-8142-b023ddc0af17, 5, 31, 3, 1, 10, 1063102, 3827167734, 34af7f978c5a17772867d929e0b800dd2db74608322d73f2f0cfd19cdcaeccc8, 04c14d9db89a3dd8da8a366cf26cd67f1de468fb5dc15f240b0d2b96dbdb5f39af962cb0bdc0bafcc9e523bf5cd4eba420c51758f987457954d32f1003bbaaf1c5, AMeToYm7FjErgUKwI93ArxeKaGHjtn2U1ZFdVjrgu4PTL82y-7D8Ca6YILjHg18h-ZgUDeuWfuFZKfOP_QYhEZ-qstcJxKq1Vt04JwZslU4T0ehgLmrPRdgF26UCGj9_m3WPkDA8rh2AJ5AJddJdvA3HzABTJeRppYQWz8ln1uDW5d2tYCeeh0U98XHm9gJfv43BpwyVB3DL1TdfVa_pOofzvEIKbAH21UxzLrjJug==
0, ba8f72b7-5a29-3ab9-8495-5b8e1bda1305, 5, 12, 0, 0, 3, 1063102, 3827167200, 34af7f978c5a17772867d929e0b800dd2db74608322d73f2f0cfd19cdcaeccc8, 04c14d9db89a3dd8da8a366cf26cd67f1de468fb5dc15f240b0d2b96dbdb5f39af962cb0bdc0bafcc9e523bf5cd4eba420c51758f987457954d32f1003bbaaf1c5, ALqPcrdaKTq5hJVbjhvaEwVxopAtlZRCzrInCOaH_tvMEdJnfNpy0AmTFTp5Ru-_LycV6pv0QpBeadNr2_H6jt2d7rEfTs9eR08mDHRKjR6DV53Pt5u0qLGaFmcaYLCHArp2C_ubqJgNpyb4zPjTp5rXV5PDTksO4PeYhJME28JhAJfyHkDQ853fUCtTzQJVGmCMuJWaLJWg82jko5QBoa89Y5ELGX32kp-Yxg4iCg==
1, ba8f72b7-5a29-3ab9-8495-5b8e1bda1305, 31, 31, 15, 15, 255, 1063102, 3827167200, 34af7f978c5a17772867d929e0b800dd2db74608322d73f2f0cfd19cdcaeccc8, 04c14d9db89a3dd8da8a366cf26cd67f1de468fb5dc15f240b0d2b96dbdb5f39af962cb0bdc0bafcc9e523bf5cd4eba420c51758f987457954d32f1003bbaaf1c5, ALqPcrdaKTq5hJVbjhvaEwXfFShvv-__d6h0S1d4bbMTtM93uLl7yNoD0E9Qci8TavfH-CrLVePyuO6iyHkDW79EhUxhr88WeJLdrVc_qxOChSnka3rocbOlXlIFEqfkGmy8wK4fmZVZpKhxcychLZgHYaS0pglKUtIQCfKFOrq2CPjGA5d8DxIIoWO-rAJ3ikleknl9meF4G909DPMKhtkcisb20477LEGGOb8PuQ==
1, ba8f72b7-5a29-3ab9-8495-5b8e1bda1305, 31, 31, 15, 15, 255, 1063102, 3827167200, 3108f08b1485adb6f72cfba1b55c7484c906a2a3a0a027c78dcd991ca64c97bd, 045f802c016b2d14ef4d7ef01617c67c7506c0cd08aed3e4bcaf34ef5ffaddebb70a073d82c37bc874ce6705cec8b1c4a03b2ccd8f28b0c5034fb8774f2e97b1a4, ALqPcrdaKTq5hJVbjhvaEwXyiPQa2-D97Dr3ux9NtWT5QKANkxZhhYbLwfG00luexeT87cwO-sAMwwFC7DEyfMYlpYB4ybZ7FcWPlPkDsXNQ6_Uxe31CokVi3uKvj8DQr0nkTnk0Sra9hZiSuHQ=
0, ba8f72b7-5a29-3ab9-8495-5b8e1bda1305, 5, 10, 3, 3, 5, 1063102, 3827167200, 34af7f978c5a17772867d929e0b800dd2db74608322d73f2f0cfd19cdcaeccc8, 04c14d9db89a3dd8da8a366cf26cd67f1de468fb5dc15f240b0d2b96dbdb5f39af962cb0bdc0bafcc9e523bf5cd4eba420c51758f987457954d32f1003bbaaf1c5, ALqPcrdaKTq5hJVbjhvaEwXIXyF3EuKebILEGjBaAzG6EKHZk-njurm_arYDm9EgaR7t8jY1H-mimWM_nFDL6Ya-usARu-AK2BqF8iBlqY-pb_Yw0bSdjmBfBx9onIwYxVVeoHG6vAvrLzy1cUNmaqEkgITx3OKyTktmRR69RB-7NWnwjtGylIqQYKmkmwIAcvLAvG4mx8HiqbwugxjKljX3Wjix535I6gdfdOgJIQ==
1, ba8f72b7-5a29-3ab9-8495-5b8e1bda1305, 5, 31, 3, 1, 10, 1063102, 3827167200, 34af7f978c5a17772867d929e0b800dd2db74608322d73f2f0cfd19cdcaeccc8, 04c14d9db89a3dd8da8a366cf26cd67f1de468fb5dc15f240b0d2b96dbdb5f39af962cb0bdc0bafcc9e523bf5cd4eba420c51758f987457954d32f1003bbaaf1c5, ALqPcrdaKTq5hJVbjhvaEwUqe2zRSlvTOddqoGAWkUplVwyZbfNK-TkwjSSOE-bMJdm8D35WNujEE6BTc_Q3N65h1qo32PeZ8IeLLyCbNEjF8DOyXah4H0JYv9OfEJZZgK-WcPqg2fasUG-AYFmrC3XGaEqZLHmTHdWBjaxvnEMwMnruoCZBrc6jUxhRnQNWoQS8SMIcquL__k_gljBOXURP-YD34n5bXw-p6EZZOg==
staff, LTId, CRIexp, venueType, venueCat1, venueCat2, periodDuration, ct_periodStart, t_qrStart, LTKey, SK_SA, PK_SA, lsp_base64
0, 752cf111-bf98-8a11-c403-1ed0fe0790f1, 5, 12, 0, 0, 3, 1063143, 3827314380, f4ac94549068cfdcb2a071dc49ad63e7acca8786204fb90d2e80685582f4f5d6, 34af7f978c5a17772867d929e0b800dd2db74608322d73f2f0cfd19cdcaeccc8, 04c14d9db89a3dd8da8a366cf26cd67f1de468fb5dc15f240b0d2b96dbdb5f39af962cb0bdc0bafcc9e523bf5cd4eba420c51758f987457954d32f1003bbaaf1c5, AHUs8RG_mIoRxAMe0P4HkPECFz4EBvSjNNgHa2uyOppCfMETmZjLlAglrFyz98ml7GLc2uRfr10oPjV5plbsdu-YDXq7hf6D7CFUKeAeDyc7bIkCsgBbbksvqsbYnTMTTsUYdO-NvFOQXYpHjijLY2Pt-q7Erw-RV-r0BQnJYJi62LiZnbNO5XgFAPzn5wP4RMjigfoLVzZilqOd-3gFUqQWDbSCq4m0nGY0SOsp7Q==
1, 752cf111-bf98-8a11-c403-1ed0fe0790f1, 31, 31, 15, 15, 255, 1063143, 3827314380, f4ac94549068cfdcb2a071dc49ad63e7acca8786204fb90d2e80685582f4f5d6, 34af7f978c5a17772867d929e0b800dd2db74608322d73f2f0cfd19cdcaeccc8, 04c14d9db89a3dd8da8a366cf26cd67f1de468fb5dc15f240b0d2b96dbdb5f39af962cb0bdc0bafcc9e523bf5cd4eba420c51758f987457954d32f1003bbaaf1c5, AHUs8RG_mIoRxAMe0P4HkPFkvrpvj3rk-NHLqb19HZb31epwPoaEWaK8tnI1vvPi8rRxh0eQOTpSp4V2l7qwyRJWnzrrwE391OzyEGH-Og379Or0WVr8PT9gfsdhiv_VxJ3cd7au-LgZP1A7IHlQrEL3rgJAD-dWIV9ydQT9UqYR5-y6j1sIj_4ij95tqAMVpPHge_4nOsI1ret0xvHsBn4hjr8v9WWmf5U4rn_wgA==
1, 752cf111-bf98-8a11-c403-1ed0fe0790f1, 31, 31, 15, 15, 255, 1063143, 3827314380, f4ac94549068cfdcb2a071dc49ad63e7acca8786204fb90d2e80685582f4f5d6, 3108f08b1485adb6f72cfba1b55c7484c906a2a3a0a027c78dcd991ca64c97bd, 045f802c016b2d14ef4d7ef01617c67c7506c0cd08aed3e4bcaf34ef5ffaddebb70a073d82c37bc874ce6705cec8b1c4a03b2ccd8f28b0c5034fb8774f2e97b1a4, AHUs8RG_mIoRxAMe0P4HkPHyclaFICuuvhq2JIKzQZzoiXQbSh1zyDaJk4_yr7VWcmHn6GQ492a03ojxGOL_o86rcmHHICl8jMTKBlYChEv52Ky_0u6BoAPOCVgIuOfhJcAKCKzJBGG6uvjZYR4=
0, 752cf111-bf98-8a11-c403-1ed0fe0790f1, 5, 10, 3, 3, 5, 1063143, 3827314380, f4ac94549068cfdcb2a071dc49ad63e7acca8786204fb90d2e80685582f4f5d6, 34af7f978c5a17772867d929e0b800dd2db74608322d73f2f0cfd19cdcaeccc8, 04c14d9db89a3dd8da8a366cf26cd67f1de468fb5dc15f240b0d2b96dbdb5f39af962cb0bdc0bafcc9e523bf5cd4eba420c51758f987457954d32f1003bbaaf1c5, AHUs8RG_mIoRxAMe0P4HkPHh6YxTkEqiG5b1OCT95jwnOBjIqk9uw-wwclaBBJQpfK_AF627JRRkvKi-jXCJhEdh0SrUzz7pq5_Q4AN2jJhzXZBg5EYwjsJ-e8oPuiITuR7dl3MIcGKOnsoE8ZAgB0WYtEnzIfliaKt7nn10yGKbTKHoUBgLfgB8U1YmXANIb8seOOCztqid_qOPp2BqtWSczt9XhM1AAHmP58rl4w==
1, 752cf111-bf98-8a11-c403-1ed0fe0790f1, 5, 31, 3, 1, 10, 1063143, 3827314380, f4ac94549068cfdcb2a071dc49ad63e7acca8786204fb90d2e80685582f4f5d6, 34af7f978c5a17772867d929e0b800dd2db74608322d73f2f0cfd19cdcaeccc8, 04c14d9db89a3dd8da8a366cf26cd67f1de468fb5dc15f240b0d2b96dbdb5f39af962cb0bdc0bafcc9e523bf5cd4eba420c51758f987457954d32f1003bbaaf1c5, AHUs8RG_mIoRxAMe0P4HkPEkCDCBdXLuAOuFMJw4ZwnAjCJAwfQK6cXy89BMN2PPfN63YaAULsy7LILYtkGtLintzA7kwEhGHwRfOCnXM1XZaLnquVl3XdJ47wKoX52QJyL82iKh5fiNpFUcMqvIO8jtLQwTwFanPFDBUBWaIHX2mdtY6gO97iwChRQp1wPiKjb61p376VgqKt4JIjK3O1k_PwnLr-asXuY5CkHSZw==
0, e3baa3ab-eb07-3d89-b78e-c9744a2f2c94, 5, 12, 0, 0, 3, 1063142, 3827311200, 00a9e6c03fbf6d523bf3a107d7f92b90a7ea2dda4f0c600d0bf788b1b4803ef1, 34af7f978c5a17772867d929e0b800dd2db74608322d73f2f0cfd19cdcaeccc8, 04c14d9db89a3dd8da8a366cf26cd67f1de468fb5dc15f240b0d2b96dbdb5f39af962cb0bdc0bafcc9e523bf5cd4eba420c51758f987457954d32f1003bbaaf1c5, AOO6o6vrBz2Jt47JdEovLJRIahZO-f9VdaNOcqlBrSggHNDPUb7tQ-US3mfslvxpcrw2nXXMbONs84MnvbkCDJvM-UW0ExHkZ2E-cfzpk2bbJJl1HOrUudq1DCTawOFGohH8ylErxos_J0xw606IRGZSpYl0JCHeJLsnGAiWAllhmE4Im-wzpqGlg-p8igLPpwRHnv9TF99ip89CPnXq8jDz7Aw_CSSQM3CsEDCu9A==
1, e3baa3ab-eb07-3d89-b78e-c9744a2f2c94, 31, 31, 15, 15, 255, 1063142, 3827311200, 00a9e6c03fbf6d523bf3a107d7f92b90a7ea2dda4f0c600d0bf788b1b4803ef1, 34af7f978c5a17772867d929e0b800dd2db74608322d73f2f0cfd19cdcaeccc8, 04c14d9db89a3dd8da8a366cf26cd67f1de468fb5dc15f240b0d2b96dbdb5f39af962cb0bdc0bafcc9e523bf5cd4eba420c51758f987457954d32f1003bbaaf1c5, AOO6o6vrBz2Jt47JdEovLJQY3mKy48JWJLpGM5RCcPjdSQZ-vEnNz0J056p1r-yIilQg32PjF6UShs-KI8e9FsZJarzIHGS1z1Rk9kKabWoFQ-Hk_AI3TD-kVEBMkPVi5tVpMjyjsdGTq_58FDyoSyKfiRvQI6Di-9APQfH--ZRrohCfgCPiuYsKe6vbdQPyzKWmLLF1X6W-5d7Qk0-zzkbLp3u2fH-L7qBtswmWhA==
1, e3baa3ab-eb07-3d89-b78e-c9744a2f2c94, 31, 31, 15, 15, 255, 1063142, 3827311200, 00a9e6c03fbf6d523bf3a107d7f92b90a7ea2dda4f0c600d0bf788b1b4803ef1, 3108f08b1485adb6f72cfba1b55c7484c906a2a3a0a027c78dcd991ca64c97bd, 045f802c016b2d14ef4d7ef01617c67c7506c0cd08aed3e4bcaf34ef5ffaddebb70a073d82c37bc874ce6705cec8b1c4a03b2ccd8f28b0c5034fb8774f2e97b1a4, AOO6o6vrBz2Jt47JdEovLJQQeh4d8fhXELncLYvzmHt0Vv59KvOTo7Xgle6nU-PgC9Yc5-Wuw6pBa_GJVja4iiVIdsi5jtPocuSvmPUDoNpABcRuycrPx4C5pUi1NH8dAYAZXk7gvIF8sUpbBho=
0, e3baa3ab-eb07-3d89-b78e-c9744a2f2c94, 5, 10, 3, 3, 5, 1063142, 3827311200, 00a9e6c03fbf6d523bf3a107d7f92b90a7ea2dda4f0c600d0bf788b1b4803ef1, 34af7f978c5a17772867d929e0b800dd2db74608322d73f2f0cfd19cdcaeccc8, 04c14d9db89a3dd8da8a366cf26cd67f1de468fb5dc15f240b0d2b96dbdb5f39af962cb0bdc0bafcc9e523bf5cd4eba420c51758f987457954d32f1003bbaaf1c5, AOO6o6vrBz2Jt47JdEovLJRMrtQSHtdIw4SWwjpZwgaaP0hss3e7tb1o1K91trODOtgJr8sH_MqP3l41KqPiTKD3uL45qafgFDRDJd12x5vTDNYX4jfknjJk5gZcwIz6-8pivqGoZNCZCxsQWf6jU5ABy0UqkkMRhBQUiAVvWZhpyP_vAcyvDvAXcYSRhQNEhzcT0h8R5h7oYQ__kmsyyrANYpQIjAPG0dphWyh9iw==
1, e3baa3ab-eb07-3d89-b78e-c9744a2f2c94, 5, 31, 3, 1, 10, 1063142, 3827311200, 00a9e6c03fbf6d523bf3a107d7f92b90a7ea2dda4f0c600d0bf788b1b4803ef1, 34af7f978c5a17772867d929e0b800dd2db74608322d73f2f0cfd19cdcaeccc8, 04c14d9db89a3dd8da8a366cf26cd67f1de468fb5dc15f240b0d2b96dbdb5f39af962cb0bdc0bafcc9e523bf5cd4eba420c51758f987457954d32f1003bbaaf1c5, AOO6o6vrBz2Jt47JdEovLJRObq-OEyPnRRSZaitQqH_IlvGvnQ6OpVmGlpiEEc8ww2ZPoZ_9iPXlxCfOuK6jkZB4YyEoL787Uwvmt20f6fYovxhuAR83Dzu4CEOoaDYyUaJF3pt74zwF4yels2k-sv01MKTsRvmc-42SUQV7zE7E0OKjU1hyNixUTmh3nwPWFZ39RLamBX14cTxjrtqgwisPsBSX2NA5f9Oi02u-eA==
locationPhone, locationRegion, locationPin, t_periodStart, SK_SA, PK_SA, SK_MCTA, PK_MCTA, lsp_base64
3380013000, 1, 012345, 3827167200, 34af7f978c5a17772867d929e0b800dd2db74608322d73f2f0cfd19cdcaeccc8, 04c14d9db89a3dd8da8a366cf26cd67f1de468fb5dc15f240b0d2b96dbdb5f39af962cb0bdc0bafcc9e523bf5cd4eba420c51758f987457954d32f1003bbaaf1c5, 3108f08b1485adb6f72cfba1b55c7484c906a2a3a0a027c78dcd991ca64c97bd, 045f802c016b2d14ef4d7ef01617c67c7506c0cd08aed3e4bcaf34ef5ffaddebb70a073d82c37bc874ce6705cec8b1c4a03b2ccd8f28b0c5034fb8774f2e97b1a4, AMeToYm7FjErgUKwI93ArxfjH9TKDsTE_Xc9Yb68IMcYw1pSGTGRawj4u2wFRS9biYOC7_oOdevJCNK0UsDlkmUlFv5azDeHl5Qxy9a0C0Zo7-AAnandO74jXm_JUfeU8lSYosCSOSrm3cOtXzx3d_E-pmVNOkSuurc-P50pvuTeu3k17BAeSqO5YrhTqwL-AFMKdKjadwQrdLY_NTBl54WwFfkqNFol4haLNQtORA==
001122334455667, 255, 012345, 3827167200, 34af7f978c5a17772867d929e0b800dd2db74608322d73f2f0cfd19cdcaeccc8, 04c14d9db89a3dd8da8a366cf26cd67f1de468fb5dc15f240b0d2b96dbdb5f39af962cb0bdc0bafcc9e523bf5cd4eba420c51758f987457954d32f1003bbaaf1c5, 3108f08b1485adb6f72cfba1b55c7484c906a2a3a0a027c78dcd991ca64c97bd, 045f802c016b2d14ef4d7ef01617c67c7506c0cd08aed3e4bcaf34ef5ffaddebb70a073d82c37bc874ce6705cec8b1c4a03b2ccd8f28b0c5034fb8774f2e97b1a4, AMeToYm7FjErgUKwI93ArxdXNAHI0NLHUQNejUy7w2vXLrdlgVnO9D9wMs9WIfFG1jYAmfjs3ywzFdLugnmycuxF72TPipxTmPngknkbQy2rMNEgJT6a3-QXT98yUeDReLCnTgkdgK-UXBD4dtnSh-H2eILIM01_cqJtokaKOQzNFl0CDu50wZIsH3ufmgOr8-yE7zn-1BmCKiS9i_sISeCefYVGaoEyhRjedp0orA==
33800130000, 21, 012345, 3827167200, 34af7f978c5a17772867d929e0b800dd2db74608322d73f2f0cfd19cdcaeccc8, 04c14d9db89a3dd8da8a366cf26cd67f1de468fb5dc15f240b0d2b96dbdb5f39af962cb0bdc0bafcc9e523bf5cd4eba420c51758f987457954d32f1003bbaaf1c5, 3108f08b1485adb6f72cfba1b55c7484c906a2a3a0a027c78dcd991ca64c97bd, 045f802c016b2d14ef4d7ef01617c67c7506c0cd08aed3e4bcaf34ef5ffaddebb70a073d82c37bc874ce6705cec8b1c4a03b2ccd8f28b0c5034fb8774f2e97b1a4, AMeToYm7FjErgUKwI93Arxf1v4Wrs-OfKKZh6BHvSGCkqtvHQHFE04Tj5C0h0_wvoU9LAD6zuN3SjGLf6a_tNgXwFB4GH_81-ehBjd5CbHZlBnBH_oW81G7YDhqCSOEVk6H97yh1icUCZY-qvNiOD0e6TPryhS6hzmN1sYgykbTilF3thEtCMQLM6WS8BgK7zJFrx9tvu224l5HDpBfOGIoM_tKBFIRPor9Tidhe5A==
33800130000, 12, 543210, 3827167200, 34af7f978c5a17772867d929e0b800dd2db74608322d73f2f0cfd19cdcaeccc8, 04c14d9db89a3dd8da8a366cf26cd67f1de468fb5dc15f240b0d2b96dbdb5f39af962cb0bdc0bafcc9e523bf5cd4eba420c51758f987457954d32f1003bbaaf1c5, 3108f08b1485adb6f72cfba1b55c7484c906a2a3a0a027c78dcd991ca64c97bd, 045f802c016b2d14ef4d7ef01617c67c7506c0cd08aed3e4bcaf34ef5ffaddebb70a073d82c37bc874ce6705cec8b1c4a03b2ccd8f28b0c5034fb8774f2e97b1a4, AMeToYm7FjErgUKwI93ArxeKaGHjtn2U1ZFdVjrgu4PTL82y-7D8Ca6YILjHg18h-ZgUDeuWfuFZKfOP_QYhEZ-qstcJxKq1Vt04JwZslU4T0ehgLmrPRdgF26UCGj9_m3WPkDA8rh2AJ5AJddJdvA3HzABTJeRppYQWz8ln1uDW5d2tYCeeh0U98XHm9gJfv43BpwyVB3DL1TdfVa_pOofzvEIKbAH21UxzLrjJug==
3380013000, 1, 012345, 3827167200, 34af7f978c5a17772867d929e0b800dd2db74608322d73f2f0cfd19cdcaeccc8, 04c14d9db89a3dd8da8a366cf26cd67f1de468fb5dc15f240b0d2b96dbdb5f39af962cb0bdc0bafcc9e523bf5cd4eba420c51758f987457954d32f1003bbaaf1c5, 3108f08b1485adb6f72cfba1b55c7484c906a2a3a0a027c78dcd991ca64c97bd, 045f802c016b2d14ef4d7ef01617c67c7506c0cd08aed3e4bcaf34ef5ffaddebb70a073d82c37bc874ce6705cec8b1c4a03b2ccd8f28b0c5034fb8774f2e97b1a4, ALqPcrdaKTq5hJVbjhvaEwVxopAtlZRCzrInCOaH_tvMEdJnfNpy0AmTFTp5Ru-_LycV6pv0QpBeadNr2_H6jt2d7rEfTs9eR08mDHRKjR6DV53Pt5u0qLGaFmcaYLCHArp2C_ubqJgNpyb4zPjTp5rXV5PDTksO4PeYhJME28JhAJfyHkDQ853fUCtTzQJVGmCMuJWaLJWg82jko5QBoa89Y5ELGX32kp-Yxg4iCg==
001122334455667, 255, 012345, 3827167200, 34af7f978c5a17772867d929e0b800dd2db74608322d73f2f0cfd19cdcaeccc8, 04c14d9db89a3dd8da8a366cf26cd67f1de468fb5dc15f240b0d2b96dbdb5f39af962cb0bdc0bafcc9e523bf5cd4eba420c51758f987457954d32f1003bbaaf1c5, 3108f08b1485adb6f72cfba1b55c7484c906a2a3a0a027c78dcd991ca64c97bd, 045f802c016b2d14ef4d7ef01617c67c7506c0cd08aed3e4bcaf34ef5ffaddebb70a073d82c37bc874ce6705cec8b1c4a03b2ccd8f28b0c5034fb8774f2e97b1a4, ALqPcrdaKTq5hJVbjhvaEwXfFShvv-__d6h0S1d4bbMTtM93uLl7yNoD0E9Qci8TavfH-CrLVePyuO6iyHkDW79EhUxhr88WeJLdrVc_qxOChSnka3rocbOlXlIFEqfkGmy8wK4fmZVZpKhxcychLZgHYaS0pglKUtIQCfKFOrq2CPjGA5d8DxIIoWO-rAJ3ikleknl9meF4G909DPMKhtkcisb20477LEGGOb8PuQ==
33800130000, 21, 012345, 3827167200, 34af7f978c5a17772867d929e0b800dd2db74608322d73f2f0cfd19cdcaeccc8, 04c14d9db89a3dd8da8a366cf26cd67f1de468fb5dc15f240b0d2b96dbdb5f39af962cb0bdc0bafcc9e523bf5cd4eba420c51758f987457954d32f1003bbaaf1c5, 3108f08b1485adb6f72cfba1b55c7484c906a2a3a0a027c78dcd991ca64c97bd, 045f802c016b2d14ef4d7ef01617c67c7506c0cd08aed3e4bcaf34ef5ffaddebb70a073d82c37bc874ce6705cec8b1c4a03b2ccd8f28b0c5034fb8774f2e97b1a4, ALqPcrdaKTq5hJVbjhvaEwXIXyF3EuKebILEGjBaAzG6EKHZk-njurm_arYDm9EgaR7t8jY1H-mimWM_nFDL6Ya-usARu-AK2BqF8iBlqY-pb_Yw0bSdjmBfBx9onIwYxVVeoHG6vAvrLzy1cUNmaqEkgITx3OKyTktmRR69RB-7NWnwjtGylIqQYKmkmwIAcvLAvG4mx8HiqbwugxjKljX3Wjix535I6gdfdOgJIQ==
33800130000, 12, 543210, 3827167200, 34af7f978c5a17772867d929e0b800dd2db74608322d73f2f0cfd19cdcaeccc8, 04c14d9db89a3dd8da8a366cf26cd67f1de468fb5dc15f240b0d2b96dbdb5f39af962cb0bdc0bafcc9e523bf5cd4eba420c51758f987457954d32f1003bbaaf1c5, 3108f08b1485adb6f72cfba1b55c7484c906a2a3a0a027c78dcd991ca64c97bd, 045f802c016b2d14ef4d7ef01617c67c7506c0cd08aed3e4bcaf34ef5ffaddebb70a073d82c37bc874ce6705cec8b1c4a03b2ccd8f28b0c5034fb8774f2e97b1a4, ALqPcrdaKTq5hJVbjhvaEwUqe2zRSlvTOddqoGAWkUplVwyZbfNK-TkwjSSOE-bMJdm8D35WNujEE6BTc_Q3N65h1qo32PeZ8IeLLyCbNEjF8DOyXah4H0JYv9OfEJZZgK-WcPqg2fasUG-AYFmrC3XGaEqZLHmTHdWBjaxvnEMwMnruoCZBrc6jUxhRnQNWoQS8SMIcquL__k_gljBOXURP-YD34n5bXw-p6EZZOg==
3380013000, 1, 012345, 3827314800, 34af7f978c5a17772867d929e0b800dd2db74608322d73f2f0cfd19cdcaeccc8, 04c14d9db89a3dd8da8a366cf26cd67f1de468fb5dc15f240b0d2b96dbdb5f39af962cb0bdc0bafcc9e523bf5cd4eba420c51758f987457954d32f1003bbaaf1c5, 3108f08b1485adb6f72cfba1b55c7484c906a2a3a0a027c78dcd991ca64c97bd, 045f802c016b2d14ef4d7ef01617c67c7506c0cd08aed3e4bcaf34ef5ffaddebb70a073d82c37bc874ce6705cec8b1c4a03b2ccd8f28b0c5034fb8774f2e97b1a4, AHUs8RG_mIoRxAMe0P4HkPECFz4EBvSjNNgHa2uyOppCfMETmZjLlAglrFyz98ml7GLc2uRfr10oPjV5plbsdu-YDXq7hf6D7CFUKeAeDyc7bIkCsgBbbksvqsbYnTMTTsUYdO-NvFOQXYpHjijLY2Pt-q7Erw-RV-r0BQnJYJi62LiZnbNO5XgFAPzn5wP4RMjigfoLVzZilqOd-3gFUqQWDbSCq4m0nGY0SOsp7Q==
001122334455667, 255, 012345, 3827314800, 34af7f978c5a17772867d929e0b800dd2db74608322d73f2f0cfd19cdcaeccc8, 04c14d9db89a3dd8da8a366cf26cd67f1de468fb5dc15f240b0d2b96dbdb5f39af962cb0bdc0bafcc9e523bf5cd4eba420c51758f987457954d32f1003bbaaf1c5, 3108f08b1485adb6f72cfba1b55c7484c906a2a3a0a027c78dcd991ca64c97bd, 045f802c016b2d14ef4d7ef01617c67c7506c0cd08aed3e4bcaf34ef5ffaddebb70a073d82c37bc874ce6705cec8b1c4a03b2ccd8f28b0c5034fb8774f2e97b1a4, AHUs8RG_mIoRxAMe0P4HkPFkvrpvj3rk-NHLqb19HZb31epwPoaEWaK8tnI1vvPi8rRxh0eQOTpSp4V2l7qwyRJWnzrrwE391OzyEGH-Og379Or0WVr8PT9gfsdhiv_VxJ3cd7au-LgZP1A7IHlQrEL3rgJAD-dWIV9ydQT9UqYR5-y6j1sIj_4ij95tqAMVpPHge_4nOsI1ret0xvHsBn4hjr8v9WWmf5U4rn_wgA==
33800130000, 21, 012345, 3827314800, 34af7f978c5a17772867d929e0b800dd2db74608322d73f2f0cfd19cdcaeccc8, 04c14d9db89a3dd8da8a366cf26cd67f1de468fb5dc15f240b0d2b96dbdb5f39af962cb0bdc0bafcc9e523bf5cd4eba420c51758f987457954d32f1003bbaaf1c5, 3108f08b1485adb6f72cfba1b55c7484c906a2a3a0a027c78dcd991ca64c97bd, 045f802c016b2d14ef4d7ef01617c67c7506c0cd08aed3e4bcaf34ef5ffaddebb70a073d82c37bc874ce6705cec8b1c4a03b2ccd8f28b0c5034fb8774f2e97b1a4, AHUs8RG_mIoRxAMe0P4HkPHh6YxTkEqiG5b1OCT95jwnOBjIqk9uw-wwclaBBJQpfK_AF627JRRkvKi-jXCJhEdh0SrUzz7pq5_Q4AN2jJhzXZBg5EYwjsJ-e8oPuiITuR7dl3MIcGKOnsoE8ZAgB0WYtEnzIfliaKt7nn10yGKbTKHoUBgLfgB8U1YmXANIb8seOOCztqid_qOPp2BqtWSczt9XhM1AAHmP58rl4w==
33800130000, 12, 543210, 3827314800, 34af7f978c5a17772867d929e0b800dd2db74608322d73f2f0cfd19cdcaeccc8, 04c14d9db89a3dd8da8a366cf26cd67f1de468fb5dc15f240b0d2b96dbdb5f39af962cb0bdc0bafcc9e523bf5cd4eba420c51758f987457954d32f1003bbaaf1c5, 3108f08b1485adb6f72cfba1b55c7484c906a2a3a0a027c78dcd991ca64c97bd, 045f802c016b2d14ef4d7ef01617c67c7506c0cd08aed3e4bcaf34ef5ffaddebb70a073d82c37bc874ce6705cec8b1c4a03b2ccd8f28b0c5034fb8774f2e97b1a4, AHUs8RG_mIoRxAMe0P4HkPEkCDCBdXLuAOuFMJw4ZwnAjCJAwfQK6cXy89BMN2PPfN63YaAULsy7LILYtkGtLintzA7kwEhGHwRfOCnXM1XZaLnquVl3XdJ47wKoX52QJyL82iKh5fiNpFUcMqvIO8jtLQwTwFanPFDBUBWaIHX2mdtY6gO97iwChRQp1wPiKjb61p376VgqKt4JIjK3O1k_PwnLr-asXuY5CkHSZw==
3380013000, 1, 012345, 3827311200, 34af7f978c5a17772867d929e0b800dd2db74608322d73f2f0cfd19cdcaeccc8, 04c14d9db89a3dd8da8a366cf26cd67f1de468fb5dc15f240b0d2b96dbdb5f39af962cb0bdc0bafcc9e523bf5cd4eba420c51758f987457954d32f1003bbaaf1c5, 3108f08b1485adb6f72cfba1b55c7484c906a2a3a0a027c78dcd991ca64c97bd, 045f802c016b2d14ef4d7ef01617c67c7506c0cd08aed3e4bcaf34ef5ffaddebb70a073d82c37bc874ce6705cec8b1c4a03b2ccd8f28b0c5034fb8774f2e97b1a4, AOO6o6vrBz2Jt47JdEovLJRIahZO-f9VdaNOcqlBrSggHNDPUb7tQ-US3mfslvxpcrw2nXXMbONs84MnvbkCDJvM-UW0ExHkZ2E-cfzpk2bbJJl1HOrUudq1DCTawOFGohH8ylErxos_J0xw606IRGZSpYl0JCHeJLsnGAiWAllhmE4Im-wzpqGlg-p8igLPpwRHnv9TF99ip89CPnXq8jDz7Aw_CSSQM3CsEDCu9A==
001122334455667, 255, 012345, 3827311200, 34af7f978c5a17772867d929e0b800dd2db74608322d73f2f0cfd19cdcaeccc8, 04c14d9db89a3dd8da8a366cf26cd67f1de468fb5dc15f240b0d2b96dbdb5f39af962cb0bdc0bafcc9e523bf5cd4eba420c51758f987457954d32f1003bbaaf1c5, 3108f08b1485adb6f72cfba1b55c7484c906a2a3a0a027c78dcd991ca64c97bd, 045f802c016b2d14ef4d7ef01617c67c7506c0cd08aed3e4bcaf34ef5ffaddebb70a073d82c37bc874ce6705cec8b1c4a03b2ccd8f28b0c5034fb8774f2e97b1a4, AOO6o6vrBz2Jt47JdEovLJQY3mKy48JWJLpGM5RCcPjdSQZ-vEnNz0J056p1r-yIilQg32PjF6UShs-KI8e9FsZJarzIHGS1z1Rk9kKabWoFQ-Hk_AI3TD-kVEBMkPVi5tVpMjyjsdGTq_58FDyoSyKfiRvQI6Di-9APQfH--ZRrohCfgCPiuYsKe6vbdQPyzKWmLLF1X6W-5d7Qk0-zzkbLp3u2fH-L7qBtswmWhA==
33800130000, 21, 012345, 3827311200, 34af7f978c5a17772867d929e0b800dd2db74608322d73f2f0cfd19cdcaeccc8, 04c14d9db89a3dd8da8a366cf26cd67f1de468fb5dc15f240b0d2b96dbdb5f39af962cb0bdc0bafcc9e523bf5cd4eba420c51758f987457954d32f1003bbaaf1c5, 3108f08b1485adb6f72cfba1b55c7484c906a2a3a0a027c78dcd991ca64c97bd, 045f802c016b2d14ef4d7ef01617c67c7506c0cd08aed3e4bcaf34ef5ffaddebb70a073d82c37bc874ce6705cec8b1c4a03b2ccd8f28b0c5034fb8774f2e97b1a4, AOO6o6vrBz2Jt47JdEovLJRMrtQSHtdIw4SWwjpZwgaaP0hss3e7tb1o1K91trODOtgJr8sH_MqP3l41KqPiTKD3uL45qafgFDRDJd12x5vTDNYX4jfknjJk5gZcwIz6-8pivqGoZNCZCxsQWf6jU5ABy0UqkkMRhBQUiAVvWZhpyP_vAcyvDvAXcYSRhQNEhzcT0h8R5h7oYQ__kmsyyrANYpQIjAPG0dphWyh9iw==
33800130000, 12, 543210, 3827311200, 34af7f978c5a17772867d929e0b800dd2db74608322d73f2f0cfd19cdcaeccc8, 04c14d9db89a3dd8da8a366cf26cd67f1de468fb5dc15f240b0d2b96dbdb5f39af962cb0bdc0bafcc9e523bf5cd4eba420c51758f987457954d32f1003bbaaf1c5, 3108f08b1485adb6f72cfba1b55c7484c906a2a3a0a027c78dcd991ca64c97bd, 045f802c016b2d14ef4d7ef01617c67c7506c0cd08aed3e4bcaf34ef5ffaddebb70a073d82c37bc874ce6705cec8b1c4a03b2ccd8f28b0c5034fb8774f2e97b1a4, AOO6o6vrBz2Jt47JdEovLJRObq-OEyPnRRSZaitQqH_IlvGvnQ6OpVmGlpiEEc8ww2ZPoZ_9iPXlxCfOuK6jkZB4YyEoL787Uwvmt20f6fYovxhuAR83Dzu4CEOoaDYyUaJF3pt74zwF4yels2k-sv01MKTsRvmc-42SUQV7zE7E0OKjU1hyNixUTmh3nwPWFZ39RLamBX14cTxjrtqgwisPsBSX2NA5f9Oi02u-eA==
......@@ -47,7 +47,8 @@ setTimeout(function() {
javaproc.on('exit', (code) => {
console.log(`Child exited with code ${code}`);
expect(code).to.equal(0);
expect([9, 12]).to.include(result.length);
console.log("OUT", result);
expect([10, 13]).to.include(result.length);
expect(result[0]).to.equal(cryptoItem.staff);
expect(result[1]).to.equal(cryptoItem.CRIexp);
expect(result[2]).to.equal(cryptoItem.venueType);
......@@ -57,11 +58,12 @@ setTimeout(function() {
// result[6] LTId
// result[7] ct_periodStart
// result[8] t_qrStart
if (result.length == 12) {
// result[9] LTKey
if (result.length == 13) {
console.log('checking location');
expect(result[9]).to.equal(cryptoItem.locationPhone);
expect(result[10]).to.equal(cryptoItem.locationRegion);
expect(result[11]).to.equal(cryptoItem.locationPIN);
expect(result[10]).to.equal(cryptoItem.locationPhone);
expect(result[11]).to.equal(cryptoItem.locationRegion);
expect(result[12]).to.equal(cryptoItem.locationPIN);
}
resolve();
});
......
......@@ -24,7 +24,7 @@ class CleaEncoderInteroperabilityTestCase(unittest.TestCase):
os.remove(self.ENC_OUT)
if os.path.exists(self.DEC_OUT):
os.remove(self.DEC_OUT)
def testCEncodingAndJavaDecoding(self):
print("Running test with C encoding and Java decoding")
lsps_encode(self.ENC_IN, self.ENC_OUT, java=False)
......@@ -71,7 +71,7 @@ def run_cmd(cmd_with_args):
process.wait()
out = process.stdout.read()
process.kill()
outs = out.decode().replace("\n", "")
outs = outs.split('=VALUES=')
results = outs[1].split(' ')
......@@ -114,11 +114,12 @@ def lsp_encode(cfg, java=False):
cmd.append(str(pin))
vals = run_cmd(cmd)
if len(vals) == 4:
if len(vals) == 5:
lsp_base_64 = {"lsp_base64": vals[0],
"LTId": vals[1],
"ct_periodStart": int(vals[2]),
"t_qrStart": int(vals[3]),
"LTKey": vals[4],
"SK_SA": cfg["SK_SA"],
"SK_MCTA": cfg["SK_MCTA"]}
else:
......@@ -144,7 +145,7 @@ def lsp_decode(cfg):
cmd.append(cfg['SK_SA'])
cmd.append(cfg['SK_MCTA'])
vals = run_cmd(cmd)
if len(vals) == 9 or len(vals) == 12:
if len(vals) == 10 or len(vals) == 13:
lsp_dict = {"staff": int(vals[0]),
"CRIexp": int(vals[1]),
"venueType": int(vals[2]),
......@@ -154,12 +155,13 @@ def lsp_decode(cfg):
"LTId": vals[6],
"ct_periodStart": int(vals[7]),
"t_qrStart": int(vals[8]),
"LTKey": vals[9],
"SK_SA": cfg['SK_SA'],
"SK_MCTA": cfg['SK_MCTA']}
if len(vals) == 12:
lsp_dict["locationPhone"] = vals[9]
lsp_dict["locationRegion"] = int(vals[10])
lsp_dict["locationPIN"] = vals[11]
if len(vals) == 13:
lsp_dict["locationPhone"] = vals[10]
lsp_dict["locationRegion"] = int(vals[11])
lsp_dict["locationPIN"] = vals[12]
else:
lsp_dict = {"Error": "lsp_decode failed"}
return lsp_dict
......@@ -238,6 +240,7 @@ def lsp_cmp(enc_in, enc_out, dec_out):
assert enc_out['LTId'] == dec_out['LTId']
assert enc_out['ct_periodStart'] == dec_out['ct_periodStart']
assert enc_out['t_qrStart'] == dec_out['t_qrStart']
assert enc_out['LTKey'] == dec_out['LTKey']
nbr = int(enc_in.get('locationPhone') is not None) + \
int(enc_in.get('locationPIN') is not None) + \
int(enc_in.get('locationRegion') is not None) + \
......@@ -274,28 +277,30 @@ def lsps_cmp(enc_in_file, enc_out_file, dec_out_file, csv_lsp_file, csv_loc_file
for idx, _ in enumerate(enc_in_s):
lsp_cmp(enc_in_s[idx], enc_out_s[idx], dec_out_s[idx])
if CSV_TEST_FILES_GENERATION:
save_lsp_encoding_decoding_results(enc_in_s[idx], enc_out_s[idx], csv_lsp_file, csv_loc_file)
save_lsp_encoding_decoding_results(enc_in_s[idx],
enc_out_s[idx], csv_lsp_file, csv_loc_file)
def save_lsp_encoding_decoding_results(enc_in, enc_out, csv_lsp_file, csv_loc_file):
sep = ', '
if csv_lsp_file is not None:
row = str(enc_in['staff']) + sep
row = str(enc_in['staff']) + sep
row += str(enc_out['LTId']) + sep + str(enc_in['CRIexp']) + sep
row += str(enc_in['venueType']) + sep + str(enc_in['venueCategory1']) + sep
row += str(enc_in['venueCategory2']) + sep + str(enc_in['periodDuration']) + sep
row += str(enc_out['ct_periodStart']) + sep + str(enc_out['t_qrStart']) + sep
row += str(enc_out['LTKey']) + sep
row += str(enc_in['SK_SA']) + sep + str(enc_in['PK_SA']) + sep
row += str(enc_out['lsp_base64'])
with open(csv_lsp_file, 'a') as outFile:
outFile.write(row + '\n')
with open(csv_lsp_file, 'a') as outfile:
outfile.write(row + '\n')
if csv_loc_file is not None and enc_in.get('locationPhone') is not None:
row = str(enc_in['locationPhone']) + sep + str(enc_in['locationRegion']) + sep
row += str(enc_in['locationPIN']) + sep + str(enc_out['ct_periodStart']*3600)
row += sep + str(enc_in['SK_SA']) + sep + str(enc_in['PK_SA']) + sep
row += str(enc_in['SK_MCTA']) + sep + str(enc_in['PK_MCTA']) + sep
row += str(enc_out['lsp_base64'])
with open(csv_loc_file, 'a') as outFile:
outFile.write(row + '\n')
with open(csv_loc_file, 'a') as outfile:
outfile.write(row + '\n')
if __name__ == "__main__":
# Parse command line arguments
......@@ -304,16 +309,16 @@ if __name__ == "__main__":
help="saving file testDecoding.csv",
action="store_true")
args = parser.parse_args()
if args.csvtest:
CSV_TEST_FILES_GENERATION = True
with open(CSV_LSP_TST, "w") as outFile:
HEADER = 'staff, LTId, CRIexp, venueType, venueCat1, venueCat2, periodDuration, ct_periodStart, t_qrStart, SK_SA, PK_SA, lsp_base64\n'
HEADER = 'staff, LTId, CRIexp, venueType, venueCat1, venueCat2, periodDuration, ct_periodStart, t_qrStart, LTKey, SK_SA, PK_SA, lsp_base64\n'
outFile.write(HEADER)
with open(CSV_LOC_TST, "w") as outFile:
HEADER = 'locationPhone, locationRegion, locationPin, t_periodStart, SK_SA, PK_SA, SK_MCTA, PK_MCTA, lsp_base64\n'
outFile.write(HEADER)
sys.argv = [ sys.argv[0] ]
unittest.main()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment