Can anyone please suggest the C# equivalent of Hex.decodeHex()
which is in Java.
Below the example in java:
Key = "7777777777777777777777777777777777777777777777777777777777777777";
byte[] KeyInBytes = Hex.decodeHex(Key.toCharArray());
I am looking for the c# equivalent of this
Any help here is highly appreciated.
CodePudding user response:
In .NET 5 and later you can use Convert.FromHexString()
.
CodePudding user response:
Convert string to hex-string in C#, I think that you are trying to do something like this.
I think it is Encoding.Default.GetBytes(Key);
as the previous link shows