mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-09-24 07:44:55 +00:00
ASN.1 OID parsing (nw)
This commit is contained in:
26
BurnOutSharp.Builder/ObjectIdentifier.dot.cs
Normal file
26
BurnOutSharp.Builder/ObjectIdentifier.dot.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
namespace BurnOutSharp.Builder
|
||||
{
|
||||
#pragma warning disable IDE0011
|
||||
|
||||
/// <summary>
|
||||
/// Methods related to Object Identifiers (OID) and dot notation
|
||||
/// </summary>
|
||||
public static partial class ObjectIdentifier
|
||||
{
|
||||
/// <summary>
|
||||
/// Parse an OID in separated-value notation into dot notation
|
||||
/// </summary>
|
||||
/// <param name="values">List of values to check against</param>
|
||||
/// <returns>List of values representing the dot notation</returns>
|
||||
public static string ParseOIDToDotNotation(ulong[] values)
|
||||
{
|
||||
// If we have an invalid set of values, we can't do anything
|
||||
if (values == null || values.Length == 0)
|
||||
return null;
|
||||
|
||||
return string.Join(".", values);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma warning restore IDE0011
|
||||
}
|
||||
Reference in New Issue
Block a user