Skip to content

Commit 02239ed

Browse files
Minor code refactor.
1 parent 23c6321 commit 02239ed

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

OnixLabs.Security.Cryptography/NamedHash.Parse.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ public static bool TryParse(ReadOnlySpan<char> value, IFormatProvider? provider,
3737

3838
if (index < 0) return false;
3939

40-
ReadOnlySpan<char> nameData = value[..index];
41-
ReadOnlySpan<char> hashData = value[(index + 1)..];
40+
ReadOnlySpan<char> name = value[..index];
41+
ReadOnlySpan<char> data = value[(index + 1)..];
4242

43-
if (nameData.IsEmpty || hashData.IsEmpty) return false;
43+
if (name.IsEmpty || data.IsEmpty) return false;
4444

45-
bool isDecoded = Hash.TryParse(hashData, provider, out Hash hash);
45+
bool isDecoded = Hash.TryParse(data, provider, out Hash hash);
4646

47-
result = new NamedHash(hash, nameData.ToString());
47+
result = new NamedHash(hash, name.ToString());
4848

4949
return isDecoded;
5050
}

OnixLabs.Security.Cryptography/NamedPublicKey.cs

-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
using OnixLabs.Core;
16-
1715
namespace OnixLabs.Security.Cryptography;
1816

1917
/// <summary>

0 commit comments

Comments
 (0)