C# Class Universe.Framework.Utilities.Utilities

Exibir arquivo Open project: Virtual-Universe/Virtual-Universe

Public Properties

Property Type Description
HostName string
RegionNames string[]
UserNames string[]

Public Methods

Method Description
Decrypt ( string cipherText, string passPhrase, string saltValue ) : string

Decrypts specified ciphertext using Rijndael symmetric key algorithm.

Most of the logic in this function is similar to the Encrypt logic. In order for decryption to work, all parameters of this function - except cipherText value - must match the corresponding parameters of the Encrypt function which was called to generate the ciphertext.

DownloadFile ( string downloadLink, string filename ) : void

Download the file from downloadLink and save it to Universe + Version +

DownloadFileAsync ( string downloadLink, string filename, DownloadProgressChangedEventHandler onProgress, AsyncCompletedEventHandler onComplete ) : void

Downloads a file async

Encrypt ( string plainText, string passPhrase, string saltValue ) : string

Encrypts specified plaintext using Rijndael symmetric key algorithm and returns a base64-encoded result.

GetAddress ( ) : string

Get the URL to our sim

GetExternalIp ( ) : string

Get OUR external IP

GetLocalIp ( ) : string

Get local IP address of system (Assumes only one address present... or gives the first valid address if mmultiple)

GetMaxMaturity ( int Maturity ) : string
GetNextWeekday ( System.DateTime start, DayOfWeek day ) : System.DateTime
GetRegionMaturity ( int Maturity ) : string
GetServerReleaseNotesURL ( ) : string

Get the URL to the release notes for the current version of Universe

IsSystemUser ( OpenMetaverse userID ) : bool

Determines whether the specified userID is a system user.

IsValidEmail ( string address ) : bool

Determines whether a string is a valid email address.

ReadExternalWebsite ( string URL ) : string

Read a website into a string

SetEncryptIterations ( int iterations ) : void

This is for encryption, it sets the number of times to iterate through the encryption

SetEncryptorType ( string type ) : void
SetKeySize ( int size ) : void

This is for encryption, it sets the size of the key

TransactionTypeInfo ( TransactionType transType ) : string
UniverseServerVersion ( ) : string

What is our version?

Private Methods

Method Description
UnGzip ( byte data, int start ) : byte[]

Method Details

Decrypt() public static method

Decrypts specified ciphertext using Rijndael symmetric key algorithm.
Most of the logic in this function is similar to the Encrypt logic. In order for decryption to work, all parameters of this function - except cipherText value - must match the corresponding parameters of the Encrypt function which was called to generate the ciphertext.
public static Decrypt ( string cipherText, string passPhrase, string saltValue ) : string
cipherText string /// Base64-formatted ciphertext value. ///
passPhrase string /// Passphrase from which a pseudo-random password will be derived. The /// derived password will be used to generate the encryption key. /// Passphrase can be any string. In this example we assume that this /// passphrase is an ASCII string. ///
saltValue string /// Salt value used along with passphrase to generate password. Salt can /// be any string. In this example we assume that salt is an ASCII string. ///
return string

DownloadFile() public static method

Download the file from downloadLink and save it to Universe + Version +
public static DownloadFile ( string downloadLink, string filename ) : void
downloadLink string Link to the download
filename string Name to put the download in
return void

DownloadFileAsync() public static method

Downloads a file async
public static DownloadFileAsync ( string downloadLink, string filename, DownloadProgressChangedEventHandler onProgress, AsyncCompletedEventHandler onComplete ) : void
downloadLink string
filename string
onProgress DownloadProgressChangedEventHandler can be null
onComplete AsyncCompletedEventHandler can be null
return void

Encrypt() public static method

Encrypts specified plaintext using Rijndael symmetric key algorithm and returns a base64-encoded result.
public static Encrypt ( string plainText, string passPhrase, string saltValue ) : string
plainText string /// Plaintext value to be encrypted. ///
passPhrase string /// Passphrase from which a pseudo-random password will be derived. The /// derived password will be used to generate the encryption key. /// Passphrase can be any string. In this example we assume that this /// passphrase is an ASCII string. ///
saltValue string /// Salt value used along with passphrase to generate password. Salt can /// be any string. In this example we assume that salt is an ASCII string. ///
return string

GetAddress() public static method

Get the URL to our sim
public static GetAddress ( ) : string
return string

GetExternalIp() public static method

Get OUR external IP
public static GetExternalIp ( ) : string
return string

GetLocalIp() public static method

Get local IP address of system (Assumes only one address present... or gives the first valid address if mmultiple)
public static GetLocalIp ( ) : string
return string

GetMaxMaturity() public static method

public static GetMaxMaturity ( int Maturity ) : string
Maturity int
return string

GetNextWeekday() public static method

public static GetNextWeekday ( System.DateTime start, DayOfWeek day ) : System.DateTime
start System.DateTime
day DayOfWeek
return System.DateTime

GetRegionMaturity() public static method

public static GetRegionMaturity ( int Maturity ) : string
Maturity int
return string

GetServerReleaseNotesURL() public static method

Get the URL to the release notes for the current version of Universe
public static GetServerReleaseNotesURL ( ) : string
return string

IsSystemUser() public static method

Determines whether the specified userID is a system user.
public static IsSystemUser ( OpenMetaverse userID ) : bool
userID OpenMetaverse User I.
return bool

IsValidEmail() public static method

Determines whether a string is a valid email address.
public static IsValidEmail ( string address ) : bool
address string Address.
return bool

ReadExternalWebsite() public static method

Read a website into a string
public static ReadExternalWebsite ( string URL ) : string
URL string URL to change into a string
return string

SetEncryptIterations() public static method

This is for encryption, it sets the number of times to iterate through the encryption
public static SetEncryptIterations ( int iterations ) : void
iterations int
return void

SetEncryptorType() public static method

public static SetEncryptorType ( string type ) : void
type string
return void

SetKeySize() public static method

This is for encryption, it sets the size of the key
public static SetKeySize ( int size ) : void
size int
return void

TransactionTypeInfo() public static method

public static TransactionTypeInfo ( TransactionType transType ) : string
transType TransactionType
return string

UniverseServerVersion() public static method

What is our version?
public static UniverseServerVersion ( ) : string
return string

Property Details

HostName public_oe static_oe property

public static string HostName
return string

RegionNames public_oe static_oe property

public static string[] RegionNames
return string[]

UserNames public_oe static_oe property

public static string[] UserNames
return string[]