Method | Description | |
---|---|---|
GenerateAPIKey ( ) : string |
Generates a 64 character long key that can be used as an API key. This can only be run on compatible Intel CPUs.
|
|
GenerateBytes ( int length ) : byte[] |
Uses the RDRAND instrution on Intel IvyBridge and higher CPUs to return truely random byte arrays. CAUTION: If this code is executed on non IvyBridge CPUs, it will return null!
|
|
GenerateKey ( int length ) : string |
Returns a base64 encoded string of a series of random(perhaps ish) bytes. On Intel IvyBridge and higher CPUs, the byte array is truely random, using the RDRAND assembly instruction to get the CPU to retrieve them. On other processors, the byte array is pseudo random, using the current time as a seed value.
|
|
GenerateUnsignedInt ( ) : uint |
Uses the RDRAND instrution on Intel IvyBridge and higher CPUs to return truely random integers. CAUTION: If this code is executed on non IvyBridge CPUs, it will return null!
|
|
GeneratorAvailable ( ) : bool |
Checks for CPU compatibility with the RDRAND instruction. The RDRAND instruction is only available on Intel IvyBridge and higher CPUs.
|
Method | Description | |
---|---|---|
IntToBytes ( uint input ) : byte[] |
public static GenerateBytes ( int length ) : byte[] | ||
length | int | Size of the byte array |
return | byte[] |
public static GenerateKey ( int length ) : string | ||
length | int | Length (in bytes) / size of the byte array |
return | string |