- Extends
- Object
HttpUtil
Miscelaneous static functions. Part of [[LibHTTP]].
Contains various algorithms, under which [[Base64]] encoding and [[MD5]]
hash generation.
[[MD5]] code by Petr Jelinek ( http://wiki.beyondunreal.com/wiki/MD5 )
Dcoumentation and Information:
http://wiki.beyondunreal.com/wiki/LibHTTP
Authors: Michiel 'El Muerte' Hendriks <elmuerte@drunksnipers.com>
Copyright 2003, 2004 Michiel "El Muerte" Hendriks
Released under the Lesser Open Unreal Mod License
http://wiki.beyondunreal.com/wiki/LesserOpenUnrealModLicense
Core.Object
|
+-- LibHTTP4.HttpUtil
Structures Summary |
DateTime year, month, day, weekday, hour, minute, second |
MD5_CTX state, count, buffer |
xURL protocol, username, password, hostname, port, location, query, hash |
Inherited Structures from Core.Object |
BoundingVolume, Box, Color, CompressedPosition, Coords, FloatBox, Guid, IntBox, InterpCurve, InterpCurvePoint, Matrix, Plane, Quat, Range, RangeVector, Rotator, Scale, TMultiMap, Vector |
Functions Summary |
| int | % (int x, int y ))
|
| int | AdvSplit (string input, string delim, out array<string> elm, optional string quoteChar))
|
| array<string> | Base64Decode (array<string> indata))
|
| array<string> | Base64Encode (array<string> indata, out array<string> B64Lookup))
|
| | Base64EncodeLookupTable (out array<string> LookupTable))
|
| string | basename (string filename))
|
| int | daysInYear (int year))
|
| string | DecToHex (int dec, int size))
|
| string | dirname (string filename))
|
| int | F (int x, int y, int z))
|
| | FF (out int a, int b, int c, int d, int x, int s, int ac))
|
| int | G (int x, int y, int z))
|
| int | getPortByProtocol (string protocol))
|
| | GG (out int a, int b, int c, int d, int x, int s, int ac))
|
| int | H (int x, int y, int z))
|
| int | HexToDec (string hexcode))
|
| | HH (out int a, int b, int c, int d, int x, int s, int ac))
|
| string | HTTPResponseCode (int code))
|
| int | I (int x, int y, int z))
|
| | II (out int a, int b, int c, int d, int x, int s, int ac))
|
| bool | isLeapYear (int year))
|
| int | leapsThruEndOf (int y))
|
| | Logf (name Comp, coerce string message, optional int level, optional coerce string Param1, optional coerce string Param2))
|
| | MD5Decode (out array<int> output, array<byte> input, int len))
|
| | MD5Encode (out array<byte> output, array<int> input, int len))
|
| | MD5Final (out array<byte> digest, out MD5_CTX context))
|
| | MD5Init (out MD5_CTX context))
|
| | MD5Move (string src, int srcindex, out array<byte> buffer, int bufindex, int len))
|
| string | MD5String (string str))
|
| string | MD5StringArray (array<string> stra, optional string Concat))
|
| | MD5Transform (out array<int> Buf, array<byte> block))
|
| | MD5Update (out MD5_CTX Context, string Data, int inputLen))
|
| bool | parseUrl (string inURL, out xURL outURL))
|
| string | RawUrlDecode (string instring, optional bool bIgnorePlus))
|
| string | RawUrlEncode (string instring))
|
| | ReplaceChar (out string instring, string from, string to))
|
| int | ROTATE_LEFT (int x, int n))
|
| int | stringToTimestamp (string datestring, optional int TZoffset))
|
| int | timestamp (int year, int mon, int day, int hour, int min, int sec))
|
| DateTime | timestampToDatetime (int timestamp))
|
| string | timestampToString (int timestamp, optional string Timezone, optional string format))
|
| string | Trim (coerce string S))
|
| float | TZtoOffset (string TZ))
|
| string | xURLtoLocation (xURL inURL, optional bool bIncludePassword))
|
| string | xURLtoString (xURL inURL, optional bool bIncludePassword))
|
Inherited Functions from Core.Object |
!, !=, $, $=, %, &, &&, *, **, *=, +, ++, +=, -, --, -=, / , /=, <, <<, <=, ==, >, >=, >>, >>>, @, @=, Abs, Acos, AllObjects, Asc, Asin, Atan, BeginState, Caps, Ceil, Chr, Clamp, ClassIsChildOf, ClearConfig, ClockwiseFrom, Cos, Created, Cross, Disable, Divide, Dot, DynamicLoadObject, EatStr, Enable, EndState, Eval, Exp, FClamp, FindObject, FMax, FMin, FRand, GetAxes, GetEnum, GetItemName, GetPerObjectNames, GetPropertyText, GetReferencers, GetStateName, GetUnAxes, GotoState, InStr, InterpCurveEval, InterpCurveGetInputDomain, InterpCurveGetOutputRange, Invert, IsA, IsInState, IsOnConsole, IsSoaking, Left, Len, Lerp, Localize, Locs, Log, Loge, Max, Mid, Min, MirrorVectorByNormal, Normal, Normalize, OrthoRotation, PlatformIs64Bit, PlatformIsMacOS, PlatformIsUnix, PlatformIsWindows, QuatFindBetween, QuatFromAxisAndAngle, QuatFromRotator, QuatInvert, QuatProduct, QuatRotateVector, QuatSlerp, QuatToRotator, Rand, RandRange, Repl, ReplaceText, ResetConfig, Right, RotRand, Round, SaveConfig, SetPropertyText, Sin, Smerp, Split, Sqrt, Square, StaticClearConfig, StaticSaveConfig, StopWatch, StrCmp, Tan, VRand, VSize, Warn, ^, ^^, |, ||, ~, ~= |
const TOKEN_HASH = "#";
const TOKEN_PATH = "/";
const TOKEN_PORT = ":";
const TOKEN_PROTOCOL = "://";
const TOKEN_QUERY = "?";
const TOKEN_USER = "@";
const TOKEN_USERPASS = ":";
const URL_ESCAPE = "%";
var const string DayNamesLong[7];
var const string DayNamesShort[7];
var const int LOGDATA;
var const int LOGERR;
var const int LOGINFO;
var const int LOGWARN;
var const string MonthNames[13];
var const int MonthOffsetLeap[13];
var const int MonthOffset[13];
struct
DateTime
{
var int day;
var int hour;
var int minute;
var int month;
var int second;
var int weekday;
var int year;
};
struct
MD5_CTX
{
var array<byte> buffer;
var array<int> count;
var array<int> state;
};
struct
xURL
{
var string hash;
var string hostname;
var string location;
var string password;
var int port;
var string protocol;
var string query;
var string username;
};
static final operator int % ( int x, int y ) )
static function int AdvSplit ( string input, string delim, out array<string> elm, optional string quoteChar) )
static final function array<string> Base64Decode ( array<string> indata) )
static final function array<string> Base64Encode ( array<string> indata, out array<string> B64Lookup) )
Base64EncodeLookupTable Source code
static final function Base64EncodeLookupTable ( out array<string> LookupTable) )
static final function string basename ( string filename) )
static final function int daysInYear ( int year) )
static final function string DecToHex ( int dec, int size) )
static final function string dirname ( string filename) )
static final function int F ( int x, int y, int z) )
static final function FF ( out int a, int b, int c, int d, int x, int s, int ac) )
static final function int G ( int x, int y, int z) )
static final function int getPortByProtocol ( string protocol) )
static final function GG ( out int a, int b, int c, int d, int x, int s, int ac) )
static final function int H ( int x, int y, int z) )
static final function int HexToDec ( string hexcode) )
static final function HH ( out int a, int b, int c, int d, int x, int s, int ac) )
static final function string HTTPResponseCode ( int code) )
static final function int I ( int x, int y, int z) )
static final function II ( out int a, int b, int c, int d, int x, int s, int ac) )
static final function bool isLeapYear ( int year) )
static final function int leapsThruEndOf ( int y) )
static final function Logf ( name Comp, coerce string message, optional int level, optional coerce string Param1, optional coerce string Param2) )
static final function MD5Decode ( out array<int> output, array<byte> input, int len) )
static final function MD5Encode ( out array<byte> output, array<int> input, int len) )
static final function MD5Final ( out array<
byte> digest, out
MD5_CTX context) )
static final function MD5Init ( out
MD5_CTX context) )
static final function MD5Move ( string src, int srcindex, out array<byte> buffer, int bufindex, int len) )
static final function string MD5String ( string str) )
static final function string MD5StringArray ( array<string> stra, optional string Concat) )
static final function MD5Transform ( out array<int> Buf, array<byte> block) )
static final function MD5Update ( out
MD5_CTX Context,
string Data,
int inputLen) )
static final function
bool parseUrl (
string inURL, out
xURL outURL) )
static final function string RawUrlDecode ( string instring, optional bool bIgnorePlus) )
static final function string RawUrlEncode ( string instring) )
static final function ReplaceChar ( out string instring, string from, string to) )
static final function int ROTATE_LEFT ( int x, int n) )
static final function int stringToTimestamp ( string datestring, optional int TZoffset) )
static final function int timestamp ( int year, int mon, int day, int hour, int min, int sec) )
static final function
DateTime timestampToDatetime (
int timestamp) )
static final function string timestampToString ( int timestamp, optional string Timezone, optional string format) )
static final function string Trim ( coerce string S) )
static final function float TZtoOffset ( string TZ) )
static final function
string xURLtoLocation (
xURL inURL, optional
bool bIncludePassword) )
static final function
string xURLtoString (
xURL inURL, optional
bool bIncludePassword) )
defaultproperties
{
LOGERR=0
LOGWARN=1
LOGINFO=2
LOGDATA=3
MonthNames[1]="Jan"
MonthNames[2]="Feb"
MonthNames[3]="Mar"
MonthNames[4]="Apr"
MonthNames[5]="May"
MonthNames[6]="Jun"
MonthNames[7]="Jul"
MonthNames[8]="Aug"
MonthNames[9]="Sep"
MonthNames[10]="Oct"
MonthNames[11]="Nov"
MonthNames[12]="Dec"
DayNamesShort[0]="Sun"
DayNamesShort[1]="Mon"
DayNamesShort[2]="Tue"
DayNamesShort[3]="Wed"
DayNamesShort[4]="Thu"
DayNamesShort[5]="Fri"
DayNamesShort[6]="Sat"
DayNamesLong[0]="Sunday"
DayNamesLong[1]="Monday"
DayNamesLong[2]="Tuesday"
DayNamesLong[3]="Wednesday"
DayNamesLong[4]="Thursday"
DayNamesLong[5]="Friday"
DayNamesLong[6]="Saturday"
MonthOffset[0]=0
MonthOffset[1]=31
MonthOffset[2]=59
MonthOffset[3]=90
MonthOffset[4]=120
MonthOffset[5]=151
MonthOffset[6]=181
MonthOffset[7]=212
MonthOffset[8]=243
MonthOffset[9]=273
MonthOffset[10]=304
MonthOffset[11]=334
MonthOffset[12]=365
MonthOffsetLeap[0]=0
MonthOffsetLeap[1]=31
MonthOffsetLeap[2]=60
MonthOffsetLeap[3]=91
MonthOffsetLeap[4]=121
MonthOffsetLeap[5]=152
MonthOffsetLeap[6]=182
MonthOffsetLeap[7]=213
MonthOffsetLeap[8]=244
MonthOffsetLeap[9]=274
MonthOffsetLeap[10]=305
MonthOffsetLeap[11]=335
MonthOffsetLeap[12]=366
}
|
Creation time: Do 14.8.2014 09:58:08.698 - Created with
UnCodeX