C# Класс ApexLumia.Utils

Показать файл Открыть проект

Открытые методы

Метод Описание
UrlEncodeRelaxed ( string value ) : string

URL encodes a string based on section 5.1 of the OAuth spec. Namely, percent encoding with [RFC3986], avoiding unreserved characters, upper-casing hexadecimal characters, and UTF-8 encoding for text value pairs.

The Uri.EscapeDataString method is supposed to take on RFC 3986 behavior if certain elements are present in a .config file. Even if this actually worked (which in my experiments it doesn't), we can't rely on every host actually having this configuration element present.

base64ify ( string thing ) : string

Encode a string into a Base64 string version.

hmacsha1ify ( string thing, string key ) : byte[]
rfc3339 ( ) : string
sha256ify ( string thing ) : string

Hash a string using SHA256

uniqueAlphanumericString ( ) : string
unix_timestamp ( ) : int

Guess what: it gives you a UNIX timestamp.

Описание методов

UrlEncodeRelaxed() публичный статический Метод

URL encodes a string based on section 5.1 of the OAuth spec. Namely, percent encoding with [RFC3986], avoiding unreserved characters, upper-casing hexadecimal characters, and UTF-8 encoding for text value pairs.
The Uri.EscapeDataString method is supposed to take on RFC 3986 behavior if certain elements are present in a .config file. Even if this actually worked (which in my experiments it doesn't), we can't rely on every host actually having this configuration element present.
public static UrlEncodeRelaxed ( string value ) : string
value string The value to escape.
Результат string

base64ify() публичный статический Метод

Encode a string into a Base64 string version.
public static base64ify ( string thing ) : string
thing string The string to encode into a Base64 version.
Результат string

hmacsha1ify() публичный статический Метод

public static hmacsha1ify ( string thing, string key ) : byte[]
thing string
key string
Результат byte[]

rfc3339() публичный статический Метод

public static rfc3339 ( ) : string
Результат string

sha256ify() публичный статический Метод

Hash a string using SHA256
public static sha256ify ( string thing ) : string
thing string The string to hash.
Результат string

uniqueAlphanumericString() публичный статический Метод

public static uniqueAlphanumericString ( ) : string
Результат string

unix_timestamp() публичный статический Метод

Guess what: it gives you a UNIX timestamp.
public static unix_timestamp ( ) : int
Результат int