mirror of
https://github.com/SabreTools/SabreTools.Hashing.git
synced 2026-02-07 05:44:34 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a334ffc25a | ||
|
|
3211f1a218 | ||
|
|
3c451b8570 | ||
|
|
ecd52b1a0e | ||
|
|
0075b9b1ad | ||
|
|
214b449e5e | ||
|
|
0bb3e541be |
167
.editorconfig
Normal file
167
.editorconfig
Normal file
@@ -0,0 +1,167 @@
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
# C# files
|
||||
[*.cs]
|
||||
|
||||
# Indentation and spacing
|
||||
charset = utf-8
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
tab_width = 4
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
# New line preferences
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
max_line_length = unset
|
||||
|
||||
# using directive preferences
|
||||
csharp_using_directive_placement = outside_namespace
|
||||
dotnet_diagnostic.IDE0005.severity = error
|
||||
|
||||
# Code-block preferences
|
||||
csharp_style_namespace_declarations = block_scoped
|
||||
csharp_style_prefer_method_group_conversion = true
|
||||
csharp_style_prefer_top_level_statements = false
|
||||
|
||||
# Expression-level preferences
|
||||
csharp_prefer_simple_default_expression = true
|
||||
csharp_style_inlined_variable_declaration = true
|
||||
csharp_style_unused_value_assignment_preference = discard_variable
|
||||
csharp_style_unused_value_expression_statement_preference = discard_variable
|
||||
dotnet_diagnostic.IDE0001.severity = warning
|
||||
dotnet_diagnostic.IDE0002.severity = warning
|
||||
dotnet_diagnostic.IDE0004.severity = warning
|
||||
dotnet_diagnostic.IDE0010.severity = error
|
||||
dotnet_diagnostic.IDE0051.severity = warning
|
||||
dotnet_diagnostic.IDE0052.severity = warning
|
||||
dotnet_diagnostic.IDE0072.severity = warning
|
||||
dotnet_diagnostic.IDE0080.severity = warning
|
||||
dotnet_diagnostic.IDE0100.severity = error
|
||||
dotnet_diagnostic.IDE0110.severity = error
|
||||
dotnet_diagnostic.IDE0120.severity = warning
|
||||
dotnet_diagnostic.IDE0121.severity = warning
|
||||
dotnet_diagnostic.IDE0240.severity = error
|
||||
dotnet_diagnostic.IDE0241.severity = error
|
||||
dotnet_style_coalesce_expression = true
|
||||
dotnet_style_namespace_match_folder = false
|
||||
dotnet_style_null_propagation = true
|
||||
dotnet_style_prefer_auto_properties = true
|
||||
dotnet_style_prefer_collection_expression = when_types_loosely_match
|
||||
dotnet_style_prefer_is_null_check_over_reference_equality_method = true
|
||||
dotnet_style_prefer_compound_assignment = true
|
||||
csharp_style_prefer_simple_property_accessors = true
|
||||
dotnet_style_prefer_simplified_interpolation = true
|
||||
dotnet_style_prefer_simplified_boolean_expressions = true
|
||||
csharp_style_prefer_unbound_generic_type_in_nameof = true
|
||||
|
||||
# Field preferences
|
||||
dotnet_diagnostic.IDE0044.severity = warning
|
||||
dotnet_style_readonly_field = true
|
||||
|
||||
# Language keyword vs. framework types preferences
|
||||
dotnet_diagnostic.IDE0049.severity = error
|
||||
dotnet_style_predefined_type_for_locals_parameters_members = true
|
||||
dotnet_style_predefined_type_for_member_access = true
|
||||
|
||||
# Modifier preferences
|
||||
csharp_prefer_static_local_function = true
|
||||
csharp_style_prefer_readonly_struct = true
|
||||
dotnet_diagnostic.IDE0036.severity = warning
|
||||
dotnet_diagnostic.IDE0040.severity = error
|
||||
dotnet_diagnostic.IDE0380.severity = error
|
||||
dotnet_style_require_accessibility_modifiers = always
|
||||
|
||||
# New-line preferences
|
||||
dotnet_diagnostic.IDE2000.severity = warning
|
||||
dotnet_diagnostic.IDE2002.severity = warning
|
||||
dotnet_diagnostic.IDE2003.severity = warning
|
||||
dotnet_diagnostic.IDE2004.severity = warning
|
||||
dotnet_diagnostic.IDE2005.severity = warning
|
||||
dotnet_diagnostic.IDE2006.severity = warning
|
||||
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = false
|
||||
csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = false
|
||||
csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = false
|
||||
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false
|
||||
dotnet_style_allow_multiple_blank_lines_experimental = false
|
||||
dotnet_style_allow_statement_immediately_after_block_experimental = false
|
||||
|
||||
# Null-checking preferences
|
||||
csharp_style_conditional_delegate_call = true
|
||||
|
||||
# Parameter preferences
|
||||
dotnet_code_quality_unused_parameters = all
|
||||
dotnet_diagnostic.IDE0280.severity = error
|
||||
|
||||
# Parentheses preferences
|
||||
dotnet_diagnostic.IDE0047.severity = warning
|
||||
dotnet_diagnostic.IDE0048.severity = warning
|
||||
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity
|
||||
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity
|
||||
dotnet_style_parentheses_in_other_operators = always_for_clarity
|
||||
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity
|
||||
|
||||
# Pattern-matching preferences
|
||||
dotnet_diagnostic.IDE0019.severity = warning
|
||||
dotnet_diagnostic.IDE0020.severity = warning
|
||||
dotnet_diagnostic.IDE0038.severity = warning
|
||||
dotnet_diagnostic.IDE0066.severity = none
|
||||
dotnet_diagnostic.IDE0083.severity = warning
|
||||
dotnet_diagnostic.IDE0260.severity = warning
|
||||
csharp_style_pattern_matching_over_as_with_null_check = true
|
||||
csharp_style_pattern_matching_over_is_with_cast_check = true
|
||||
csharp_style_prefer_not_pattern = true
|
||||
csharp_style_prefer_pattern_matching = true
|
||||
|
||||
# this. and Me. preferences
|
||||
dotnet_style_qualification_for_event = false
|
||||
dotnet_style_qualification_for_field = false
|
||||
dotnet_style_qualification_for_method = false
|
||||
dotnet_style_qualification_for_property = false
|
||||
|
||||
# var preferences
|
||||
csharp_style_var_for_built_in_types = false
|
||||
csharp_style_var_when_type_is_apparent = true
|
||||
|
||||
# .NET formatting options
|
||||
dotnet_separate_import_directive_groups = false
|
||||
dotnet_sort_system_directives_first = true
|
||||
|
||||
# C# formatting options
|
||||
csharp_indent_block_contents = true
|
||||
csharp_indent_braces = false
|
||||
csharp_indent_case_contents = true
|
||||
csharp_indent_case_contents_when_block = false
|
||||
csharp_indent_labels = one_less_than_current
|
||||
csharp_indent_switch_labels = true
|
||||
csharp_new_line_before_catch = true
|
||||
csharp_new_line_before_else = true
|
||||
csharp_new_line_before_finally = true
|
||||
csharp_new_line_before_members_in_anonymous_types = true
|
||||
csharp_new_line_before_members_in_object_initializers = true
|
||||
csharp_new_line_before_open_brace = all
|
||||
csharp_new_line_between_query_expression_clauses = true
|
||||
csharp_preserve_single_line_blocks = true
|
||||
csharp_preserve_single_line_statements = true
|
||||
csharp_space_after_cast = false
|
||||
csharp_space_after_colon_in_inheritance_clause = true
|
||||
csharp_space_after_comma = true
|
||||
csharp_space_after_dot = false
|
||||
csharp_space_after_keywords_in_control_flow_statements = true
|
||||
csharp_space_after_semicolon_in_for_statement = true
|
||||
csharp_space_around_binary_operators = before_and_after
|
||||
csharp_space_around_declaration_statements = false
|
||||
csharp_space_before_colon_in_inheritance_clause = true
|
||||
csharp_space_before_comma = false
|
||||
csharp_space_before_dot = false
|
||||
csharp_space_before_open_square_brackets = false
|
||||
csharp_space_before_semicolon_in_for_statement = false
|
||||
csharp_space_between_empty_square_brackets = false
|
||||
csharp_space_between_method_call_empty_parameter_list_parentheses = false
|
||||
csharp_space_between_method_call_name_and_opening_parenthesis = false
|
||||
csharp_space_between_method_call_parameter_list_parentheses = false
|
||||
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
|
||||
csharp_space_between_method_declaration_parameter_list_parentheses = false
|
||||
csharp_space_between_parentheses = false
|
||||
csharp_space_between_square_brackets = false
|
||||
27
.github/ISSUE_TEMPLATE/feature-request.md
vendored
Normal file
27
.github/ISSUE_TEMPLATE/feature-request.md
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
name: Feature Request
|
||||
about: For when you know better than me what you want
|
||||
title: "[Request]"
|
||||
labels: enhancement
|
||||
assignees: mnadareski
|
||||
|
||||
---
|
||||
|
||||
**Before You Submit**
|
||||
|
||||
- Remember to try the [latest WIP build](https://github.com/SabreTools/SabreTools.Hashing/releases/tag/rolling) to see if the feature already exists.
|
||||
- Check [previous issues](https://github.com/SabreTools/SabreTools.Hashing/issues) to see if any of those are related to what you're about to ask for.
|
||||
|
||||
If none of those apply, then continue...
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
21
.github/ISSUE_TEMPLATE/informational.md
vendored
Normal file
21
.github/ISSUE_TEMPLATE/informational.md
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
name: Info
|
||||
about: Something you need to tell me
|
||||
title: "[Info]"
|
||||
labels: question
|
||||
assignees: mnadareski
|
||||
|
||||
---
|
||||
|
||||
**Before You Submit**
|
||||
|
||||
- Remember to try the [latest WIP build](https://github.com/SabreTools/SabreTools.Hashing/releases/tag/rolling) to see if the feature already exists.
|
||||
- Check [previous issues](https://github.com/SabreTools/SabreTools.Hashing/issues) to see if any of those are related to what you're about to ask for.
|
||||
|
||||
If none of those apply, then continue...
|
||||
|
||||
**Is your information related to one of the checksums/hashes supported or something that isn't a bug in the code? Please describe.**
|
||||
A clear and concise description of what the information is. Ex. With the latest build of Hasher, it [...]
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the information here.
|
||||
45
.github/ISSUE_TEMPLATE/issue-report.md
vendored
Normal file
45
.github/ISSUE_TEMPLATE/issue-report.md
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
---
|
||||
name: Issue Report
|
||||
about: Tell me what's wrong, seriously
|
||||
title: "[Problem]"
|
||||
labels: bug
|
||||
assignees: mnadareski
|
||||
|
||||
---
|
||||
|
||||
**Before You Submit**
|
||||
|
||||
- Remember to try the [latest WIP build](https://github.com/SabreTools/SabreTools.Hashing/releases/tag/rolling) to see if the issue has already been addressed.
|
||||
- Check multiple inputs to help narrow down the issue
|
||||
|
||||
If all of those fail, then continue...
|
||||
|
||||
**Version**
|
||||
What version are you using?
|
||||
|
||||
- [ ] Stable release (version here)
|
||||
- [ ] WIP release (version here)
|
||||
|
||||
**Build**
|
||||
What runtime version are you using?
|
||||
|
||||
- [ ] .NET 10 running on (Operating System)
|
||||
|
||||
**Describe the issue**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
|
||||
1. Create the '...' hasher
|
||||
2. Run the hasher with '....'
|
||||
3. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
78
.github/workflows/build_and_test.yml
vendored
78
.github/workflows/build_and_test.yml
vendored
@@ -1,48 +1,48 @@
|
||||
name: Build and Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
push:
|
||||
branches: ["main"]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v5
|
||||
with:
|
||||
dotnet-version: |
|
||||
8.0.x
|
||||
9.0.x
|
||||
10.0.x
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Run tests
|
||||
run: dotnet test
|
||||
|
||||
- name: Run publish script
|
||||
run: ./publish-nix.sh -d
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v5
|
||||
with:
|
||||
dotnet-version: |
|
||||
8.0.x
|
||||
9.0.x
|
||||
10.0.x
|
||||
|
||||
- name: Update rolling tag
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git tag -f rolling
|
||||
git push origin :refs/tags/rolling || true
|
||||
git push origin rolling --force
|
||||
- name: Run tests
|
||||
run: dotnet test
|
||||
|
||||
- name: Upload to rolling
|
||||
uses: ncipollo/release-action@v1.20.0
|
||||
with:
|
||||
allowUpdates: True
|
||||
artifacts: "*.nupkg,*.snupkg,*.zip"
|
||||
body: 'Last built commit: ${{ github.sha }}'
|
||||
name: 'Rolling Release'
|
||||
prerelease: True
|
||||
replacesArtifacts: True
|
||||
tag: "rolling"
|
||||
updateOnlyUnreleased: True
|
||||
- name: Run publish script
|
||||
run: ./publish-nix.sh -d
|
||||
|
||||
- name: Update rolling tag
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git tag -f rolling
|
||||
git push origin :refs/tags/rolling || true
|
||||
git push origin rolling --force
|
||||
|
||||
- name: Upload to rolling
|
||||
uses: ncipollo/release-action@v1.20.0
|
||||
with:
|
||||
allowUpdates: True
|
||||
artifacts: "*.nupkg,*.snupkg,*.zip"
|
||||
body: "Last built commit: ${{ github.sha }}"
|
||||
name: "Rolling Release"
|
||||
prerelease: True
|
||||
replacesArtifacts: True
|
||||
tag: "rolling"
|
||||
updateOnlyUnreleased: True
|
||||
|
||||
34
.github/workflows/check_pr.yml
vendored
34
.github/workflows/check_pr.yml
vendored
@@ -3,21 +3,21 @@ name: Build PR
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v5
|
||||
with:
|
||||
dotnet-version: |
|
||||
8.0.x
|
||||
9.0.x
|
||||
10.0.x
|
||||
|
||||
- name: Build
|
||||
run: dotnet build
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Run tests
|
||||
run: dotnet test
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v5
|
||||
with:
|
||||
dotnet-version: |
|
||||
8.0.x
|
||||
9.0.x
|
||||
10.0.x
|
||||
|
||||
- name: Build
|
||||
run: dotnet build
|
||||
|
||||
- name: Run tests
|
||||
run: dotnet test
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace Hasher.Features
|
||||
foreach (string typeString in types)
|
||||
{
|
||||
HashType? hashType = typeString.GetHashType();
|
||||
if (hashType != null && !hashTypes.Contains(hashType.Value))
|
||||
if (hashType is not null && !hashTypes.Contains(hashType.Value))
|
||||
hashTypes.Add(item: hashType.Value);
|
||||
}
|
||||
}
|
||||
@@ -141,7 +141,7 @@ namespace Hasher.Features
|
||||
{
|
||||
// Get all file hashes for flexibility
|
||||
var hashes = HashTool.GetFileHashes(file);
|
||||
if (hashes == null)
|
||||
if (hashes is null)
|
||||
{
|
||||
if (debug) Console.WriteLine($"Hashes for {file} could not be retrieved");
|
||||
return;
|
||||
@@ -152,7 +152,7 @@ namespace Hasher.Features
|
||||
foreach (HashType hashType in hashTypes)
|
||||
{
|
||||
// TODO: Make helper to pretty-print hash type names
|
||||
if (hashes.TryGetValue(hashType, out string? hash) && hash != null)
|
||||
if (hashes.TryGetValue(hashType, out string? hash) && hash is not null)
|
||||
builder.AppendLine($"{hashType}: {hash}");
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<PropertyGroup Condition="$(TargetFramework.StartsWith(`netcoreapp`)) OR $(TargetFramework.StartsWith(`net5`))">
|
||||
<RuntimeIdentifiers>win-x86;win-x64;win-arm64;linux-x64;linux-arm64;osx-x64</RuntimeIdentifiers>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="$(TargetFramework.StartsWith(`net6`)) OR $(TargetFramework.StartsWith(`net7`)) OR $(TargetFramework.StartsWith(`net8`)) OR $(TargetFramework.StartsWith(`net9`))">
|
||||
<PropertyGroup Condition="$(TargetFramework.StartsWith(`net6`)) OR $(TargetFramework.StartsWith(`net7`)) OR $(TargetFramework.StartsWith(`net8`)) OR $(TargetFramework.StartsWith(`net9`)) OR $(TargetFramework.StartsWith(`net10`))">
|
||||
<RuntimeIdentifiers>win-x86;win-x64;win-arm64;linux-x64;linux-arm64;osx-x64;osx-arm64</RuntimeIdentifiers>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="$(RuntimeIdentifier.StartsWith(`osx-arm`))">
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Hasher
|
||||
var commandSet = CreateCommands(mainFeature);
|
||||
|
||||
// If we have no args, show the help and quit
|
||||
if (args == null || args.Length == 0)
|
||||
if (args is null || args.Length == 0)
|
||||
{
|
||||
commandSet.OutputAllHelp();
|
||||
return;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Xunit;
|
||||
|
||||
@@ -16,15 +15,15 @@ namespace SabreTools.Hashing.Test
|
||||
/// <summary>
|
||||
/// Get an array of all hash types
|
||||
/// </summary>
|
||||
public static List<object[]> AllHashTypes
|
||||
public static TheoryData<HashType> AllHashTypes
|
||||
{
|
||||
get
|
||||
{
|
||||
var values = Enum.GetValues<HashType>();
|
||||
var set = new List<object[]>();
|
||||
var set = new TheoryData<HashType>();
|
||||
foreach (var value in values)
|
||||
{
|
||||
set.Add([value]);
|
||||
set.Add(value);
|
||||
}
|
||||
|
||||
return set;
|
||||
|
||||
@@ -42,4 +42,4 @@ namespace SabreTools.Hashing.Test
|
||||
Assert.Equal(expected, result);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace SabreTools.Hashing.Test
|
||||
/// <summary>
|
||||
/// Helper class for tests
|
||||
/// </summary>
|
||||
/// CRC values confirmed with <see href="https://emn178.github.io/online-tools/crc/"/>
|
||||
/// CRC values confirmed with <see href="https://emn178.github.io/online-tools/crc/"/>
|
||||
internal static class TestHelper
|
||||
{
|
||||
#region Known File Information
|
||||
@@ -143,6 +143,7 @@ namespace SabreTools.Hashing.Test
|
||||
{HashType.CRC32_BZIP2, "18aa4603"},
|
||||
{HashType.CRC32_CDROMEDC, "b8ced467"},
|
||||
{HashType.CRC32_CKSUM, "f27b3c27"},
|
||||
{HashType.CRC32_DVDROMEDC, "b538afc0"},
|
||||
{HashType.CRC32_ISCSI, "544d37db"},
|
||||
{HashType.CRC32_ISOHDLC, "ba02a660"},
|
||||
{HashType.CRC32_JAMCRC, "45fd599f"},
|
||||
@@ -244,4 +245,4 @@ namespace SabreTools.Hashing.Test
|
||||
public static void ValidateSize(long fileSize)
|
||||
=> Assert.Equal(_hashFileSize, fileSize);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Xunit;
|
||||
|
||||
@@ -10,15 +9,15 @@ namespace SabreTools.Hashing.Test
|
||||
/// <summary>
|
||||
/// Get an array of all hash types
|
||||
/// </summary>
|
||||
public static List<object[]> AllHashTypes
|
||||
public static TheoryData<HashType> AllHashTypes
|
||||
{
|
||||
get
|
||||
{
|
||||
var values = Enum.GetValues<HashType>();
|
||||
var set = new List<object[]>();
|
||||
var set = new TheoryData<HashType>();
|
||||
foreach (var value in values)
|
||||
{
|
||||
set.Add([value]);
|
||||
set.Add(value);
|
||||
}
|
||||
|
||||
return set;
|
||||
|
||||
@@ -204,17 +204,17 @@ namespace SabreTools.Hashing.Checksum
|
||||
while (offset < end)
|
||||
{
|
||||
ulong low = local ^ (uint)(
|
||||
(data[offset + 0])
|
||||
data[offset + 0]
|
||||
+ (data[offset + 1] << 8)
|
||||
+ (data[offset + 2] << 16)
|
||||
+ (data[offset + 3] << 24));
|
||||
offset += 4;
|
||||
|
||||
local = _table[3, (byte)(low)]
|
||||
local = _table[3, (byte)low]
|
||||
^ _table[2, (byte)(low >> 8)]
|
||||
^ _table[1, (byte)(low >> 16)]
|
||||
^ _table[0, (byte)(low >> 24)]
|
||||
^ local >> 32;
|
||||
^ (local >> 32);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -246,26 +246,26 @@ namespace SabreTools.Hashing.Checksum
|
||||
while (offset < end)
|
||||
{
|
||||
ulong low = local ^ (uint)(
|
||||
(data[offset + 0])
|
||||
data[offset + 0]
|
||||
+ (data[offset + 1] << 8)
|
||||
+ (data[offset + 2] << 16)
|
||||
+ (data[offset + 3] << 24));
|
||||
ulong high = (uint)(
|
||||
(data[offset + 4])
|
||||
data[offset + 4]
|
||||
+ (data[offset + 5] << 8)
|
||||
+ (data[offset + 6] << 16)
|
||||
+ (data[offset + 7] << 24));
|
||||
offset += 8;
|
||||
|
||||
local = _table[7, (byte)(low)]
|
||||
local = _table[7, (byte)low]
|
||||
^ _table[6, (byte)(low >> 8)]
|
||||
^ _table[5, (byte)(low >> 16)]
|
||||
^ _table[4, (byte)(low >> 24)]
|
||||
^ _table[3, (byte)(high)]
|
||||
^ _table[3, (byte)high]
|
||||
^ _table[2, (byte)(high >> 8)]
|
||||
^ _table[1, (byte)(high >> 16)]
|
||||
^ _table[0, (byte)(high >> 24)]
|
||||
^ local >> 32;
|
||||
^ (local >> 32);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -297,26 +297,26 @@ namespace SabreTools.Hashing.Checksum
|
||||
while (offset < end)
|
||||
{
|
||||
ulong low = local ^ (uint)(
|
||||
(data[offset + 3])
|
||||
data[offset + 3]
|
||||
+ (data[offset + 2] << 8)
|
||||
+ (data[offset + 1] << 16)
|
||||
+ (data[offset + 0] << 24));
|
||||
ulong high = (uint)(
|
||||
(data[offset + 7])
|
||||
data[offset + 7]
|
||||
+ (data[offset + 6] << 8)
|
||||
+ (data[offset + 5] << 16)
|
||||
+ (data[offset + 4] << 24));
|
||||
offset += 8;
|
||||
|
||||
local = _table[4, (byte)(low)]
|
||||
local = _table[4, (byte)low]
|
||||
^ _table[5, (byte)(low >> 8)]
|
||||
^ _table[6, (byte)(low >> 16)]
|
||||
^ _table[7, (byte)(low >> 24)]
|
||||
^ _table[0, (byte)(high)]
|
||||
^ _table[0, (byte)high]
|
||||
^ _table[1, (byte)(high >> 8)]
|
||||
^ _table[2, (byte)(high >> 16)]
|
||||
^ _table[3, (byte)(high >> 24)]
|
||||
^ local << 32;
|
||||
^ (local << 32);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace SabreTools.Hashing.Checksum
|
||||
if (c1 >= F32BASE)
|
||||
c1 -= F32BASE;
|
||||
|
||||
_hash = (uint)((c1 << 16) | c0);
|
||||
_hash = (c1 << 16) | c0;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace SabreTools.Hashing.Checksum
|
||||
|
||||
// Only added so many BASE's
|
||||
c1 %= F32BASE;
|
||||
_hash = (uint)((c1 << 16) | c0);
|
||||
_hash = (c1 << 16) | c0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1481,6 +1481,20 @@ namespace SabreTools.Hashing.Checksum
|
||||
XorOut = 0xffffffff,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// CRC-32/DVD-ROM-EDC
|
||||
/// </summary>
|
||||
public static readonly CrcDefinition CRC32_DVDROMEDC = new()
|
||||
{
|
||||
Name = "CRC-32/DVD-ROM-EDC",
|
||||
Width = 32,
|
||||
Poly = 0x80000011,
|
||||
Init = 0x00000000,
|
||||
ReflectIn = false,
|
||||
ReflectOut = false,
|
||||
XorOut = 0x00000000,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// CRC-32/ISCSI
|
||||
/// </summary>
|
||||
|
||||
@@ -138,6 +138,7 @@ namespace SabreTools.Hashing
|
||||
HashType.CRC32_BZIP2 => "BZIP2",
|
||||
HashType.CRC32_CDROMEDC => "CRC-32/CD-ROM-EDC",
|
||||
HashType.CRC32_CKSUM => "CRC-32/CKSUM",
|
||||
HashType.CRC32_DVDROMEDC => "CRC-32/DVD-ROM-EDC",
|
||||
HashType.CRC32_ISCSI => "CRC-32/ISCSI",
|
||||
HashType.CRC32_ISOHDLC => "CRC-32/ISO-HDLC",
|
||||
HashType.CRC32_JAMCRC => "CRC-32/JAMCRC",
|
||||
@@ -364,6 +365,7 @@ namespace SabreTools.Hashing
|
||||
"crc32_bzip2" => HashType.CRC32_BZIP2,
|
||||
"crc32_cdromedc" => HashType.CRC32_CDROMEDC,
|
||||
"crc32_cksum" => HashType.CRC32_CKSUM,
|
||||
"crc32_dvdromedc" => HashType.CRC32_DVDROMEDC,
|
||||
"crc32_iscsi" => HashType.CRC32_ISCSI,
|
||||
"crc32_isohdlc" => HashType.CRC32_ISOHDLC,
|
||||
"crc32_jamcrc" => HashType.CRC32_JAMCRC,
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace SabreTools.Hashing
|
||||
public static string? ByteArrayToString(byte[]? bytes)
|
||||
{
|
||||
// If we get null in, we send null out
|
||||
if (bytes == null)
|
||||
if (bytes is null)
|
||||
return null;
|
||||
|
||||
try
|
||||
@@ -38,7 +38,7 @@ namespace SabreTools.Hashing
|
||||
public static ulong BytesToUInt64(byte[]? bytes)
|
||||
{
|
||||
// If we get null in, we send 0 out
|
||||
if (bytes == null)
|
||||
if (bytes is null)
|
||||
return default;
|
||||
|
||||
ulong result = 0;
|
||||
@@ -60,9 +60,9 @@ namespace SabreTools.Hashing
|
||||
public static uint ReadBE32(byte[] data, int offset)
|
||||
{
|
||||
return (uint)(data[offset + 3]
|
||||
| data[offset + 2] << 8
|
||||
| data[offset + 1] << 16
|
||||
| data[offset + 0] << 24);
|
||||
| (data[offset + 2] << 8)
|
||||
| (data[offset + 1] << 16)
|
||||
| (data[offset + 0] << 24));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -71,13 +71,13 @@ namespace SabreTools.Hashing
|
||||
public static ulong ReadBE64(byte[] data, int offset)
|
||||
{
|
||||
return data[offset + 7]
|
||||
| (ulong)data[offset + 6] << 8
|
||||
| (ulong)data[offset + 5] << 16
|
||||
| (ulong)data[offset + 4] << 24
|
||||
| (ulong)data[offset + 3] << 32
|
||||
| (ulong)data[offset + 2] << 40
|
||||
| (ulong)data[offset + 1] << 48
|
||||
| (ulong)data[offset + 0] << 56;
|
||||
| ((ulong)data[offset + 6] << 8)
|
||||
| ((ulong)data[offset + 5] << 16)
|
||||
| ((ulong)data[offset + 4] << 24)
|
||||
| ((ulong)data[offset + 3] << 32)
|
||||
| ((ulong)data[offset + 2] << 40)
|
||||
| ((ulong)data[offset + 1] << 48)
|
||||
| ((ulong)data[offset + 0] << 56);
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -90,9 +90,9 @@ namespace SabreTools.Hashing
|
||||
public static uint ReadLE32(byte[] data, int offset)
|
||||
{
|
||||
return (uint)(data[offset + 0]
|
||||
| data[offset + 1] << 8
|
||||
| data[offset + 2] << 16
|
||||
| data[offset + 3] << 24);
|
||||
| (data[offset + 1] << 8)
|
||||
| (data[offset + 2] << 16)
|
||||
| (data[offset + 3] << 24));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -101,13 +101,13 @@ namespace SabreTools.Hashing
|
||||
public static ulong ReadLE64(byte[] data, int offset)
|
||||
{
|
||||
return data[offset + 0]
|
||||
| (ulong)data[offset + 1] << 8
|
||||
| (ulong)data[offset + 2] << 16
|
||||
| (ulong)data[offset + 3] << 24
|
||||
| (ulong)data[offset + 4] << 32
|
||||
| (ulong)data[offset + 5] << 40
|
||||
| (ulong)data[offset + 6] << 48
|
||||
| (ulong)data[offset + 7] << 56;
|
||||
| ((ulong)data[offset + 1] << 8)
|
||||
| ((ulong)data[offset + 2] << 16)
|
||||
| ((ulong)data[offset + 3] << 24)
|
||||
| ((ulong)data[offset + 4] << 32)
|
||||
| ((ulong)data[offset + 5] << 40)
|
||||
| ((ulong)data[offset + 6] << 48)
|
||||
| ((ulong)data[offset + 7] << 56);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace SabreTools.Hashing
|
||||
// Get all file hashes
|
||||
HashType[] standardHashTypes = [HashType.CRC32, HashType.MD5, HashType.SHA1];
|
||||
var fileHashes = GetFileHashesAndSize(filename, standardHashTypes, out size);
|
||||
if (fileHashes == null)
|
||||
if (fileHashes is null)
|
||||
return false;
|
||||
|
||||
// Assign the file hashes and return
|
||||
@@ -58,7 +58,7 @@ namespace SabreTools.Hashing
|
||||
// Get all file hashes
|
||||
HashType[] standardHashTypes = [HashType.CRC32, HashType.MD5, HashType.SHA1];
|
||||
var fileHashes = GetByteArrayHashesAndSize(array, standardHashTypes, out size);
|
||||
if (fileHashes == null)
|
||||
if (fileHashes is null)
|
||||
return false;
|
||||
|
||||
// Assign the file hashes and return
|
||||
@@ -85,7 +85,7 @@ namespace SabreTools.Hashing
|
||||
// Get all file hashes
|
||||
HashType[] standardHashTypes = [HashType.CRC32, HashType.MD5, HashType.SHA1];
|
||||
var fileHashes = GetStreamHashesAndSize(stream, standardHashTypes, out size);
|
||||
if (fileHashes == null)
|
||||
if (fileHashes is null)
|
||||
return false;
|
||||
|
||||
// Assign the file hashes and return
|
||||
@@ -598,7 +598,7 @@ namespace SabreTools.Hashing
|
||||
|
||||
// Run the hashing
|
||||
var hashers = GetStreamHashesInternal(input, hashTypes, leaveOpen, out size);
|
||||
if (hashers == null)
|
||||
if (hashers is null)
|
||||
return null;
|
||||
|
||||
// Get the results
|
||||
@@ -657,7 +657,7 @@ namespace SabreTools.Hashing
|
||||
|
||||
// Run the hashing
|
||||
var hashers = GetStreamHashesInternal(input, hashTypes, leaveOpen, out size);
|
||||
if (hashers == null)
|
||||
if (hashers is null)
|
||||
return null;
|
||||
|
||||
// Get the results
|
||||
|
||||
@@ -615,6 +615,11 @@ namespace SabreTools.Hashing
|
||||
/// </summary>
|
||||
CRC32_CKSUM,
|
||||
|
||||
/// <summary>
|
||||
/// CRC 32-bit checksum (CRC-32/DVD-ROM-EDC)
|
||||
/// </summary>
|
||||
CRC32_DVDROMEDC,
|
||||
|
||||
/// <summary>
|
||||
/// CRC 32-bit checksum (CRC-32/ISCSI)
|
||||
/// </summary>
|
||||
|
||||
@@ -208,6 +208,7 @@ namespace SabreTools.Hashing
|
||||
HashType.CRC32_BZIP2 => new Crc(StandardDefinitions.CRC32_BZIP2),
|
||||
HashType.CRC32_CDROMEDC => new Crc(StandardDefinitions.CRC32_CDROMEDC),
|
||||
HashType.CRC32_CKSUM => new Crc(StandardDefinitions.CRC32_CKSUM),
|
||||
HashType.CRC32_DVDROMEDC => new Crc(StandardDefinitions.CRC32_DVDROMEDC),
|
||||
HashType.CRC32_ISCSI => new Crc(StandardDefinitions.CRC32_ISCSI),
|
||||
HashType.CRC32_ISOHDLC => new Crc(StandardDefinitions.CRC32_ISOHDLC),
|
||||
HashType.CRC32_JAMCRC => new Crc(StandardDefinitions.CRC32_JAMCRC),
|
||||
@@ -324,6 +325,10 @@ namespace SabreTools.Hashing
|
||||
s256.AppendData(s256BufferSpan);
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
// No-op
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -339,6 +344,9 @@ namespace SabreTools.Hashing
|
||||
case HashAlgorithm ha:
|
||||
ha.TransformFinalBlock(emptyBuffer, 0, 0);
|
||||
break;
|
||||
default:
|
||||
// No-op
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -350,12 +358,12 @@ namespace SabreTools.Hashing
|
||||
private static string? GetCRCVariableLengthString(Crc cr)
|
||||
{
|
||||
// Ignore null values
|
||||
if (cr.Hash == null)
|
||||
if (cr.Hash is null)
|
||||
return null;
|
||||
|
||||
// Get the total number of characters needed
|
||||
ulong hash = BytesToUInt64(cr.Hash);
|
||||
int length = cr.Def.Width / 4 + (cr.Def.Width % 4 > 0 ? 1 : 0);
|
||||
int length = (cr.Def.Width / 4) + (cr.Def.Width % 4 > 0 ? 1 : 0);
|
||||
return hash.ToString($"x{length}");
|
||||
}
|
||||
|
||||
@@ -367,7 +375,7 @@ namespace SabreTools.Hashing
|
||||
private static string? GetSpamSumBase64String(SpamSum.SpamSum ss)
|
||||
{
|
||||
// Ignore null values
|
||||
if (ss.Hash == null)
|
||||
if (ss.Hash is null)
|
||||
return null;
|
||||
|
||||
return System.Text.Encoding.ASCII.GetString(ss.Hash);
|
||||
|
||||
@@ -153,7 +153,7 @@ namespace SabreTools.Hashing.NonCryptographicHash
|
||||
{
|
||||
val = Round(0, val);
|
||||
acc ^= val;
|
||||
acc = acc * XXH_PRIME64_1 + XXH_PRIME64_4;
|
||||
acc = (acc * XXH_PRIME64_1) + XXH_PRIME64_4;
|
||||
return acc;
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ namespace SabreTools.Hashing.NonCryptographicHash
|
||||
ulong k1 = Round(0, ReadLE64(data, offset));
|
||||
offset += 8;
|
||||
hash ^= k1;
|
||||
hash = RotateLeft64(hash, 27) * XXH_PRIME64_1 + XXH_PRIME64_4;
|
||||
hash = (RotateLeft64(hash, 27) * XXH_PRIME64_1) + XXH_PRIME64_4;
|
||||
length -= 8;
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ namespace SabreTools.Hashing.NonCryptographicHash
|
||||
{
|
||||
hash ^= ReadLE32(data, offset) * XXH_PRIME64_1;
|
||||
offset += 4;
|
||||
hash = RotateLeft64(hash, 23) * XXH_PRIME64_2 + XXH_PRIME64_3;
|
||||
hash = (RotateLeft64(hash, 23) * XXH_PRIME64_2) + XXH_PRIME64_3;
|
||||
length -= 4;
|
||||
}
|
||||
|
||||
|
||||
@@ -163,6 +163,7 @@ internal static class Comparisons
|
||||
secondTraverse[secondIndex + 1] = Math.Min(Math.Min(costA, costD), costR);
|
||||
}
|
||||
|
||||
#pragma warning disable IDE0180 // Use tuple to swap values
|
||||
#if NETCOREAPP || NETSTANDARD2_0_OR_GREATER
|
||||
(secondTraverse, firstTraverse) = (firstTraverse, secondTraverse);
|
||||
#else
|
||||
@@ -170,6 +171,7 @@ internal static class Comparisons
|
||||
firstTraverse = secondTraverse;
|
||||
secondTraverse = tempArray;
|
||||
#endif
|
||||
#pragma warning restore IDE0180
|
||||
}
|
||||
|
||||
long score = firstTraverse[second.Length];
|
||||
@@ -177,13 +179,13 @@ internal static class Comparisons
|
||||
const int spamSumLength = 64;
|
||||
const int rollingWindow = 7;
|
||||
const int minBlocksize = 3;
|
||||
score = (score * spamSumLength) / (first.Length + second.Length);
|
||||
score = score * spamSumLength / (first.Length + second.Length);
|
||||
|
||||
// Currently, the score ranges from 0-64 (64 being the length of a spamsum), with 0 being the strongest match
|
||||
// and 64 being the weakest match.
|
||||
|
||||
// Change scale to 0-100
|
||||
score = (100 * score) / spamSumLength;
|
||||
score = 100 * score / spamSumLength;
|
||||
|
||||
// Invert scale so 0 is the weakest possible match and 100 is the strongest
|
||||
score = 100 - score;
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace SabreTools.Hashing.SpamSum
|
||||
/// The longest possible length for a fuzzy hash signature
|
||||
/// (without the filename)
|
||||
/// </summary>
|
||||
public const int FUZZY_MAX_RESULT = 2 * SPAMSUM_LENGTH + 20;
|
||||
public const int FUZZY_MAX_RESULT = (2 * SPAMSUM_LENGTH) + 20;
|
||||
|
||||
public const uint ROLLING_WINDOW = 7;
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace SabreTools.Hashing.SpamSum
|
||||
// start_blocksize. Get rid of it.
|
||||
++BHStart;
|
||||
ReduceBorder *= 2;
|
||||
RollMask = RollMask * 2 + 1;
|
||||
RollMask = (RollMask * 2) + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ using System;
|
||||
using System.Text;
|
||||
using static SabreTools.Hashing.SpamSum.Constants;
|
||||
|
||||
#pragma warning disable IDE0059 // Unnecessary assignment of a value
|
||||
namespace SabreTools.Hashing.SpamSum
|
||||
{
|
||||
/// <see href="https://github.com/ssdeep-project/ssdeep/blob/master/fuzzy.c"/>
|
||||
@@ -54,7 +55,7 @@ namespace SabreTools.Hashing.SpamSum
|
||||
protected override byte[] HashFinal()
|
||||
{
|
||||
string? digest = Finalize(0);
|
||||
if (digest == null)
|
||||
if (digest is null)
|
||||
return [];
|
||||
|
||||
return Encoding.ASCII.GetBytes(digest.TrimEnd('\0'));
|
||||
@@ -249,8 +250,8 @@ namespace SabreTools.Hashing.SpamSum
|
||||
{
|
||||
++bi;
|
||||
i = (int)_state.BH[bi].DIndex;
|
||||
if ((flags & FUZZY_FLAG_NOTRUNC) == 0 && i > SPAMSUM_LENGTH / 2 - 1)
|
||||
i = SPAMSUM_LENGTH / 2 - 1;
|
||||
if ((flags & FUZZY_FLAG_NOTRUNC) == 0 && i > (SPAMSUM_LENGTH / 2) - 1)
|
||||
i = (SPAMSUM_LENGTH / 2) - 1;
|
||||
|
||||
if (i > remain)
|
||||
return null;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#pragma warning disable IDE0051 // Remove unused private members
|
||||
namespace SabreTools.Hashing.XxHash
|
||||
{
|
||||
// https://github.com/Cyan4973/xxHash/blob/dev/xxhash.h
|
||||
|
||||
@@ -172,7 +172,7 @@ namespace SabreTools.Hashing.XxHash
|
||||
if (length > 0)
|
||||
return Len1To3Out64(data, offset, length, secret, seed);
|
||||
|
||||
return XXH64Avalanche(seed ^ (ReadLE64(secret, 56) ^ ReadLE64(secret, 64)));
|
||||
return XXH64Avalanche(seed ^ ReadLE64(secret, 56) ^ ReadLE64(secret, 64));
|
||||
}
|
||||
|
||||
public static ulong Mix16B(byte[] data, int offset, byte[] secret, int secretOffset, ulong seed)
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
#pragma warning disable CS0169 // Private field is never used
|
||||
#pragma warning disable CS0414 // Private field is assigned but its value is never used
|
||||
#pragma warning disable CS0649 // Field is never assigned to
|
||||
#pragma warning disable IDE0044 // Add readonly modifier
|
||||
#pragma warning disable IDE0051 // Remove unused private members
|
||||
#pragma warning disable IDE0052 // Remove unread private members
|
||||
#pragma warning disable IDE0060 // Remove unused parameter
|
||||
namespace SabreTools.Hashing.XxHash
|
||||
{
|
||||
// Handle unused private fields
|
||||
#pragma warning disable CS0169
|
||||
#pragma warning disable CS0414
|
||||
#pragma warning disable CS0649
|
||||
|
||||
/// <summary>
|
||||
/// Structure for XXH3 streaming API.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
#pragma warning disable CS0169 // Private field is never used
|
||||
#pragma warning disable CS0414 // Private field is assigned but its value is never used
|
||||
#pragma warning disable CS0649 // Field is never assigned to
|
||||
#pragma warning disable IDE0044 // Add readonly modifier
|
||||
#pragma warning disable IDE0051 // Remove unused private members
|
||||
#pragma warning disable IDE0052 // Remove unread private members
|
||||
#pragma warning disable IDE0060 // Remove unused parameter
|
||||
namespace SabreTools.Hashing.XxHash
|
||||
{
|
||||
// Handle unused private fields
|
||||
#pragma warning disable CS0169
|
||||
#pragma warning disable CS0414
|
||||
#pragma warning disable CS0649
|
||||
|
||||
/// <summary>
|
||||
/// Structure for XXH3 streaming API.
|
||||
/// </summary>
|
||||
|
||||
@@ -221,6 +221,7 @@ namespace SabreTools.Hashing
|
||||
{HashType.CRC32_BZIP2, [0x00, 0x00, 0x00, 0x00]},
|
||||
{HashType.CRC32_CDROMEDC, [0x00, 0x00, 0x00, 0x00]},
|
||||
{HashType.CRC32_CKSUM, [0xff, 0xff, 0xff, 0xff]},
|
||||
{HashType.CRC32_DVDROMEDC, [0x00, 0x00, 0x00, 0x00]},
|
||||
{HashType.CRC32_ISCSI, [0x00, 0x00, 0x00, 0x00]},
|
||||
{HashType.CRC32_ISOHDLC, [0x00, 0x00, 0x00, 0x00]},
|
||||
{HashType.CRC32_JAMCRC, [0xff, 0xff, 0xff, 0xff]},
|
||||
@@ -523,6 +524,7 @@ namespace SabreTools.Hashing
|
||||
{HashType.CRC32_BZIP2, "00000000"},
|
||||
{HashType.CRC32_CDROMEDC, "00000000"},
|
||||
{HashType.CRC32_CKSUM, "ffffffff"},
|
||||
{HashType.CRC32_DVDROMEDC, "00000000"},
|
||||
{HashType.CRC32_ISCSI, "00000000"},
|
||||
{HashType.CRC32_ISOHDLC, "00000000"},
|
||||
{HashType.CRC32_JAMCRC, "ffffffff"},
|
||||
|
||||
Reference in New Issue
Block a user