C# 클래스 Keen.Core.ScopedKey

ScopedKey provides encryption and decryption functions which can be used to create and read scoped keys, such as the API Read and Write keys.
파일 보기 프로젝트 열기: keenlabs/keen-sdk-net

공개 메소드들

메소드 설명
Decrypt ( string apiKey, string scopedKey ) : string

Decrypt an existing scoped key.

Encrypt ( string apiKey, object secOptions, string IV = "" ) : string

Encrypt an object containing security options to create a scoped key.

EncryptString ( string apiKey, string secOptions, string IV = "" ) : string

Encrypt a string containing JSON formatted Security Options to create a scoped key.

비공개 메소드들

메소드 설명
ByteToHex ( byte a ) : string
ConvertKey ( string apiKey ) : byte[]

Convert an apiKey string to a byte array.

GetAes ( byte Key, string IV ) : Aes

Set up an Aes instance with the correct mode, key and IV

HexToByte ( string hex ) : byte[]
RemovePadding ( string text ) : string

Remove PKCS5/7 padding

메소드 상세

Decrypt() 공개 정적인 메소드

Decrypt an existing scoped key.
public static Decrypt ( string apiKey, string scopedKey ) : string
apiKey string Master API key
scopedKey string Scoped key to be decrypted
리턴 string

Encrypt() 공개 정적인 메소드

Encrypt an object containing security options to create a scoped key.
public static Encrypt ( string apiKey, object secOptions, string IV = "" ) : string
apiKey string Master API key
secOptions object An object that can be serialized to produce JSON formatted Security Options
IV string Optional IV, normally not required
리턴 string

EncryptString() 공개 정적인 메소드

Encrypt a string containing JSON formatted Security Options to create a scoped key.
public static EncryptString ( string apiKey, string secOptions, string IV = "" ) : string
apiKey string Master API key
secOptions string Security Options in JSON format
IV string Optional IV, normally not required
리턴 string