ESLockDecryptor.Core 1.0.0

dotnet add package ESLockDecryptor.Core --version 1.0.0
                    
NuGet\Install-Package ESLockDecryptor.Core -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ESLockDecryptor.Core" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ESLockDecryptor.Core" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="ESLockDecryptor.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ESLockDecryptor.Core --version 1.0.0
                    
#r "nuget: ESLockDecryptor.Core, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ESLockDecryptor.Core@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ESLockDecryptor.Core&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=ESLockDecryptor.Core&version=1.0.0
                    
Install as a Cake Tool

ESLockDecryptor.Core

ESLockDecryptor.Core is a .NET library for reading metadata and decrypting files created by ES File Explorer with the .eslock extension

Installation

dotnet add package ESLockDecryptor.Core --version 1.0.0

The package currently targets .NET 10.

Stream processing

EslockFileDecryptor contains the complete single-file workflow: footer detection, key selection, CRC validation, original file name decryption, and stream decryption. It does not open files or write logs.

using ESLockDecryptor.Core.Configuration;
using ESLockDecryptor.Core.Processing;

var key = Convert.FromHexString("00112233445566778899AABBCCDDEEFF");
using Stream input = File.OpenRead("photo.jpg.eslock");

var options = new DecryptionOptions
{
    Key = key,
    Heuristic = false,
    IgnoreCrc = false
};

var plan = EslockFileDecryptor.Prepare(input, options);

Console.WriteLine(plan.OriginalFileName);

using Stream output = File.Create(plan.OriginalFileName ?? "photo.jpg");
EslockFileDecryptor.Decrypt(input, output, plan);

For a browser application, use a seekable stream such as MemoryStream when the browser file stream itself does not support seeking.

Low-level decryption

using ESLockDecryptor.Core.Configuration;
using ESLockDecryptor.Core.Cryptography;

var key = KeyDerivator.DeriveKeyFromPassword("password");

using Stream input = File.OpenRead("photo.jpg.eslock");
using Stream output = File.Create("photo.jpg");

var config = DecryptionConfig.CreateFullEncryption(
    originalFileLength: input.Length,
    key: key);

EslockDecryptor.DecryptStream(input, output, config);

For partial encryption, use CreatePartialEncryption and provide the encrypted block size:

var config = DecryptionConfig.CreatePartialEncryption(
    originalFileLength: input.Length,
    key: key,
    encryptedBlockSize: 1024);

The key must be the 16-byte AES key used by the file. When a password is available, KeyDerivator can derive the key expected by ES File Explorer:

var key = KeyDerivator.DeriveKeyFromPassword(password);

Reading metadata

Footer readers require a seekable stream and restore the stream position after reading:

using ESLockDecryptor.Core.IO;

var reader = new StandardFooterReader();
var footer = reader.ReadFooter(input);

Console.WriteLine(footer.IsCrcValid);
Console.WriteLine(footer.FooterOffset);

Use HeuristicFooterReader when the standard footer cannot be read.

Use this library only for files and systems you own or are explicitly authorized to investigate. The project is distributed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 83 10/13/2026

Initial stable release of the reusable decryption core.