Skip to content

Commit

Permalink
fixed login problem for older .2fa files
Browse files Browse the repository at this point in the history
  • Loading branch information
jp-weber committed Mar 23, 2023
1 parent 0b996e1 commit f912da4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Project2FA.Core/Services/JSON/NewtonsoftJSONService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public bool TrySerialize(object parameter, out string result)
public string SerializeEncrypt(string key, byte[] initVectorArray, object value, int encryptionVersion)
{
byte[] byteArrayKey;
if (encryptionVersion == 1)
if (encryptionVersion == 1 || encryptionVersion == 0)
{
byteArrayKey = CryptoService.CreateByteArrayKeyV1(key);
}
Expand Down Expand Up @@ -102,7 +102,7 @@ public string SerializeEncrypt(string key, byte[] initVectorArray, object value,
public string SerializeEncrypt(byte[] keyArray, byte[] initVectorArray, object value, int encryptionVersion)
{
byte[] byteArrayKey;
if (encryptionVersion == 1)
if (encryptionVersion == 1 || encryptionVersion == 0)
{
byteArrayKey = CryptoService.CreateByteArrayKeyV1(keyArray);
}
Expand Down Expand Up @@ -206,7 +206,7 @@ public bool TryDeserialize<T>(string value, out T result)
public T DeserializeDecrypt<T>(string key, byte[] initVector, string value, int encryptionVersion)
{
byte[] byteArrayKey;
if (encryptionVersion == 1)
if (encryptionVersion == 1 || encryptionVersion == 0)
{
byteArrayKey = CryptoService.CreateByteArrayKeyV1(key);
}
Expand Down Expand Up @@ -236,7 +236,7 @@ public T DeserializeDecrypt<T>(string key, byte[] initVector, string value, int
public T DeserializeDecrypt<T>(byte[] keyArray, byte[] initVector, string value, int encryptionVersion)
{
byte[] byteArrayKey;
if (encryptionVersion == 1)
if (encryptionVersion == 1 || encryptionVersion == 0)
{
byteArrayKey = CryptoService.CreateByteArrayKeyV1(keyArray);
}
Expand Down
2 changes: 1 addition & 1 deletion Project2FA/Project2FA.UWP/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap mp rescap">
<Identity Name="38343JanPhilippWeber.2fastBeta" Publisher="CN=31DBFF9D-D4FF-4E73-808A-7B49119D08D3" Version="1.2.4.0" />
<mp:PhoneIdentity PhoneProductId="6e07ecc6-51e6-4bf6-be38-e290abf62222" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<mp:PhoneIdentity PhoneProductId="444c9c36-b7d8-48b0-a562-0a1d5d1e9658" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>2fast (Beta)</DisplayName>
<PublisherDisplayName>Jan Philipp Weber</PublisherDisplayName>
Expand Down
2 changes: 1 addition & 1 deletion Project2FA/Project2FA.UWP/Project2FA.UWP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
<AppxAutoIncrementPackageRevision>False</AppxAutoIncrementPackageRevision>
<AppxBundle>Always</AppxBundle>
<AppxBundlePlatforms>x86|x64|arm|arm64</AppxBundlePlatforms>
<AppxBundlePlatforms>x64|arm64</AppxBundlePlatforms>
<PackageCertificateThumbprint>5603522399507011BC16B020D4E00718C66AB93F</PackageCertificateThumbprint>
<AppInstallerUpdateFrequency>0</AppInstallerUpdateFrequency>
<AppInstallerCheckForUpdateFrequency>OnApplicationRun</AppInstallerCheckForUpdateFrequency>
Expand Down

0 comments on commit f912da4

Please sign in to comment.