BarbezDotEu.Byte
Helper class containing diverse static methods that can be used in any type of context.
Generates a string representation of a byte array.
A string representation of the hash.
Name | Type | Description |
---|---|---|
hash | System.Byte[] | The hash to write as string. |
Converts a "written" byte-array to an actual byte array. e.g. input string: 69CC766AEFAE05F6BE92A529E27D6AC50A0DC73EFB3631534B5E41A9311D56AB.
The actual byte-array representation.
Name | Type | Description |
---|---|---|
hex | System.String | The "written" byte-array to convert. |
Based on https://stackoverflow.com/a/321404/8669939
Creates a byte array from the string, using the System.Text.Encoding.Default encoding unless another is specified.
This method has no parameters.
BarbezDotEu.Byte
Byte array converter allowing for a fast enough and accurate conversion between Java and C# byte arrays.
Converts a C# byte array (represented as string) into a Java byte array (returned as its string representation).
The string representation of a Java byte array.
Name | Type | Description |
---|---|---|
cSharpByteArray | System.String | The string representation of a C# byte array. |
Converts a C# byte array (represented as string) into a Java byte array (returned as its int representation because Java byte arrays can contain negative values).
The Java byte array as integer array.
Name | Type | Description |
---|---|---|
cSharpByteArray | System.String[] | The string[] representation of a C# byte array. |
Converts a Java byte array (represented as string) into a C# byte array (returned as its string representation).
The string representation of a C# byte array.
Name | Type | Description |
---|---|---|
javaByteArray | System.String | The string representation of a Java byte array. |
Converts a Java byte array (represented as string) into a C# byte array (returned as its int representation for consistency).
The C# byte array as integer array.
Name | Type | Description |
---|---|---|
javaByteArray | System.String[] | The string[] representation of a Java byte array. |
BarbezDotEu.Byte
Helpers for cryptography.
Equivalent of T-SQL's HASHBYTES('SHA2_256', )".
The result of the hash.
Name | Type | Description |
---|---|---|
toHash | System.String | The string to hash. |