C# Class Nyan.Modules.Web.Push.Google.Helper

Mostrar archivo Open project: bucknellu/Nyan

Public Methods

Method Description
Base64ForUrlDecode ( string str ) : string

Decode Base64 encoded string with URL and Filename Safe Alphabet using UTF-8.

Base64ForUrlEncode ( string str ) : string

Base 64 Encoding with URL and Filename Safe Alphabet using UTF-8 character set.

Base64UrlDecode ( string arg ) : byte[]
Base64UrlEncode ( byte arg ) : string
ConvertInt ( int number ) : byte[]
CreateInfoChunk ( string type, byte recipientPublicKey, byte senderPublicKey ) : byte[]
EncryptMessage ( byte userKey, byte userSecret, byte data, ushort padding, bool randomisePadding = false ) : EncryptionResult
GenerateHKDF ( byte salt, byte ikm, byte info, int len ) : byte[]
SendNotification ( EndpointEntry sub, byte data, int ttl, ushort padding, bool randomisePadding = false ) : bool
SendNotification ( EndpointEntry target, object obj ) : bool
SendNotification ( string endpoint, byte userKey, byte userSecret, byte data = null, int ttl, ushort padding, bool randomisePadding = false ) : bool
SendNotification ( string endpoint, string data, string userKey, string userSecret, int ttl, ushort padding, bool randomisePadding = false ) : bool

Method Details

Base64ForUrlDecode() public static method

Decode Base64 encoded string with URL and Filename Safe Alphabet using UTF-8.
public static Base64ForUrlDecode ( string str ) : string
str string Base64 code
return string

Base64ForUrlEncode() public static method

Base 64 Encoding with URL and Filename Safe Alphabet using UTF-8 character set.
public static Base64ForUrlEncode ( string str ) : string
str string The origianl string
return string

Base64UrlDecode() public static method

public static Base64UrlDecode ( string arg ) : byte[]
arg string
return byte[]

Base64UrlEncode() public static method

public static Base64UrlEncode ( byte arg ) : string
arg byte
return string

ConvertInt() public static method

public static ConvertInt ( int number ) : byte[]
number int
return byte[]

CreateInfoChunk() public static method

public static CreateInfoChunk ( string type, byte recipientPublicKey, byte senderPublicKey ) : byte[]
type string
recipientPublicKey byte
senderPublicKey byte
return byte[]

EncryptMessage() public static method

public static EncryptMessage ( byte userKey, byte userSecret, byte data, ushort padding, bool randomisePadding = false ) : EncryptionResult
userKey byte
userSecret byte
data byte
padding ushort
randomisePadding bool
return EncryptionResult

GenerateHKDF() public static method

public static GenerateHKDF ( byte salt, byte ikm, byte info, int len ) : byte[]
salt byte
ikm byte
info byte
len int
return byte[]

SendNotification() public static method

public static SendNotification ( EndpointEntry sub, byte data, int ttl, ushort padding, bool randomisePadding = false ) : bool
sub Nyan.Modules.Web.Push.Model.EndpointEntry
data byte
ttl int
padding ushort
randomisePadding bool
return bool

SendNotification() public static method

public static SendNotification ( EndpointEntry target, object obj ) : bool
target Nyan.Modules.Web.Push.Model.EndpointEntry
obj object
return bool

SendNotification() public static method

public static SendNotification ( string endpoint, byte userKey, byte userSecret, byte data = null, int ttl, ushort padding, bool randomisePadding = false ) : bool
endpoint string
userKey byte
userSecret byte
data byte
ttl int
padding ushort
randomisePadding bool
return bool

SendNotification() public static method

public static SendNotification ( string endpoint, string data, string userKey, string userSecret, int ttl, ushort padding, bool randomisePadding = false ) : bool
endpoint string
data string
userKey string
userSecret string
ttl int
padding ushort
randomisePadding bool
return bool