mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Add nussubg converter
This commit is contained in:
@@ -8,7 +8,7 @@ namespace SabreTools.Core.Tools
|
||||
#region Enum to Enum
|
||||
|
||||
/// <summary>
|
||||
/// Get the fields associated with each hash type
|
||||
/// Get the Fields associated with each hash type
|
||||
/// </summary>
|
||||
public static List<Field> AsFields(this Hash hash)
|
||||
{
|
||||
@@ -36,6 +36,35 @@ namespace SabreTools.Core.Tools
|
||||
return fields;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the DatItemFields associated with each hash type
|
||||
/// </summary>
|
||||
public static List<DatItemField> AsDatItemFields(this Hash hash)
|
||||
{
|
||||
List<DatItemField> fields = new List<DatItemField>();
|
||||
|
||||
if (hash.HasFlag(Hash.CRC))
|
||||
fields.Add(DatItemField.CRC);
|
||||
if (hash.HasFlag(Hash.MD5))
|
||||
fields.Add(DatItemField.MD5);
|
||||
#if NET_FRAMEWORK
|
||||
if (hash.HasFlag(Hash.RIPEMD160))
|
||||
fields.Add(DatItemField.RIPEMD160);
|
||||
#endif
|
||||
if (hash.HasFlag(Hash.SHA1))
|
||||
fields.Add(DatItemField.SHA1);
|
||||
if (hash.HasFlag(Hash.SHA256))
|
||||
fields.Add(DatItemField.SHA256);
|
||||
if (hash.HasFlag(Hash.SHA384))
|
||||
fields.Add(DatItemField.SHA384);
|
||||
if (hash.HasFlag(Hash.SHA512))
|
||||
fields.Add(DatItemField.SHA512);
|
||||
if (hash.HasFlag(Hash.SpamSum))
|
||||
fields.Add(DatItemField.SpamSum);
|
||||
|
||||
return fields;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region String to Enum
|
||||
|
||||
Reference in New Issue
Block a user