Skip to content

Commit e136b1d

Browse files
authored
Merge pull request #47 from hmlendea/normalisation
Deobfuscate data values
2 parents 4bf8fc2 + b29f166 commit e136b1d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

PersonalLogManager.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<PackageReference Include="NuciAPI.Controllers" Version="2.1.0" />
1212
<PackageReference Include="NuciDAL" Version="2.4.1" />
1313
<PackageReference Include="NuciSecurity.HMAC" Version="4.1.2" />
14+
<PackageReference Include="NuciText.Obfuscation" Version="1.0.0" />
1415
</ItemGroup>
1516

1617
<ItemGroup>

Service/TextBuilding/PersonalLogTextBuilderBase.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using NuciText.Obfuscation;
34
using PersonalLogManager.Service.Models;
45

56
namespace PersonalLogManager.Service.TextBuilding
@@ -10,6 +11,8 @@ public abstract class PersonalLogTextBuilderBase
1011

1112
protected string MissingValue => "[MISSING_VALUE]";
1213

14+
NuciTextObfuscator obfuscator = new();
15+
1316
public string BuildTextLogText(PersonalLog log)
1417
=> GetDataValue(log.Data, "text");
1518

@@ -77,7 +80,7 @@ public string GetDataValue(Dictionary<string, string> data, string key, string d
7780
return defaultValue;
7881
}
7982

80-
return value;
83+
return obfuscator.Obfuscate(value);
8184
}
8285

8386
public string GetDecimalValue(Dictionary<string, string> data, string key)

0 commit comments

Comments
 (0)