62 if (!(
Arguments[0].AssociatedObjectValue is
byte[] Bin))
69 object Obj =
Arguments[0].AssociatedObjectValue;
78 if (d >=
int.MinValue && d <=
int.MaxValue)
79 s = ((int)d).ToString(
"x");
80 else if (d >=
long.MinValue && d <=
long.MaxValue)
81 s = ((long)d).ToString(
"x");
83 s = ((BigInteger)d).ToString(
"x");
85 else if (Obj is BigInteger i)
90 int MaxLen = NrBytes << 1;
98 s =
new string(
'f', MaxLen - c) + s;
100 s =
new string(
'0', MaxLen - c) + s;
override IElement Evaluate(IElement[] Arguments, Variables Variables)
Evaluates the function.
override string FunctionName
Name of the function
override string[] DefaultArgumentNames
Default Argument names
HexEncode(ScriptNode Integer, ScriptNode NrBytes, int Start, int Length, Expression Expression)
HexEncode(Data)
HexEncode(ScriptNode Data, int Start, int Length, Expression Expression)
HexEncode(Data)
Exception thrown if binary data is expected.
Script runtime exception.
Class managing a script expression.
static double ToDouble(object Object)
Converts an object to a double value.
Base class for multivariate funcions.
ScriptNode[] Arguments
Function arguments.
static readonly ArgumentType[] argumentTypes2Scalar
Two scalar parameters.
static readonly ArgumentType[] argumentTypes1Normal
One scalar parameter.
Base class for all nodes in a parsed script tree.
int Length
Length of expression covered by node.
Expression Expression
Expression of which the node is a part.
int Start
Start position in script expression.
Contains methods for simple hash calculations.
static string BinaryToString(byte[] Data)
Converts an array of bytes to a string with their hexadecimal representations (in lower case).
Basic interface for all types of elements.