Merge pull request #588 from Mbucari/master

Use old activation bytes if present.
This commit is contained in:
Mbucari 2023-04-17 19:34:26 -06:00 committed by GitHub
commit ea9e36fd76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View File

@ -32,6 +32,10 @@ namespace AaxDecrypter
protected bool Step_GetMetadata() protected bool Step_GetMetadata()
{ {
AaxFile = new AaxFile(InputFileStream); AaxFile = new AaxFile(InputFileStream);
if (DownloadOptions.AudibleKey?.Length == 8 && DownloadOptions.AudibleIV is null)
AaxFile.SetDecryptionKey(DownloadOptions.AudibleKey);
else
AaxFile.SetDecryptionKey(DownloadOptions.AudibleKey, DownloadOptions.AudibleIV); AaxFile.SetDecryptionKey(DownloadOptions.AudibleKey, DownloadOptions.AudibleIV);
if (DownloadOptions.StripUnabridged) if (DownloadOptions.StripUnabridged)

View File

@ -182,7 +182,6 @@ namespace AaxDecrypter
FileUtility.SaferDelete(jsonDownloadState); FileUtility.SaferDelete(jsonDownloadState);
if (!string.IsNullOrEmpty(DownloadOptions.AudibleKey) && if (!string.IsNullOrEmpty(DownloadOptions.AudibleKey) &&
!string.IsNullOrEmpty(DownloadOptions.AudibleIV) &&
DownloadOptions.RetainEncryptedFile) DownloadOptions.RetainEncryptedFile)
{ {
string aaxPath = Path.ChangeExtension(tempFilePath, ".aax"); string aaxPath = Path.ChangeExtension(tempFilePath, ".aax");

View File

@ -5,7 +5,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="AudibleApi" Version="8.3.0.1" /> <PackageReference Include="AudibleApi" Version="8.4.0.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>