C# 클래스 SebWindowsClient.ConfigurationUtils.SEBConfigFileManager

파일 보기 프로젝트 열기: SafeExamBrowser/seb-win 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
sebPasswordDialogForm SebPasswordDialogForm

공개 메소드들

메소드 설명
DecryptSEBSettings ( byte sebData, bool forEditing, string &sebFilePassword, bool &passwordIsHash, X509Certificate2 &sebFileCertificateRef ) : Dictionary,System.Collections.Generic

Decrypt and deserialize SEB settings When forEditing = true, then the decrypting password the user entered and/or certificate reference found in the .seb file is returned

EncryptDataUsingIdentity ( byte data, X509Certificate2 certificateRef ) : byte[]

Encrypt preferences using a certificate

EncryptDataUsingPassword ( byte data, string password, bool passwordIsHash, SEBSettings configPurpose ) : byte[]

Encrypt preferences using a password

EncryptSEBSettingsWithCredentials ( string settingsPassword, bool passwordIsHash, X509Certificate2 certificateRef, SEBSettings configPurpose, bool forEditing ) : byte[]

Show SEB Password Dialog Form.

Read SEB settings from UserDefaults and encrypt them using provided security credentials

GetPrefixDataFromData ( byte &data, int prefixLength ) : byte[]

Helper method for stripping (and returning) a prefix byte array of prefixLength from a data byte array which is returned without the stripped prefix

GetPrefixStringFromData ( byte &data ) : string

Helper method for returning a prefix string (of PREFIX_LENGTH, currently 4 chars) from a data byte array which is returned without the stripped prefix

StoreDecryptedSEBSettings ( byte sebData ) : bool

Decrypt, parse and use new SEB settings

비공개 메소드들

메소드 설명
DecryptDataWithPasswordForConfiguringClient ( byte sebData, bool forEditing, string &sebFilePassword, bool &passwordIsHash ) : Dictionary,System.Collections.Generic

Helper method which decrypts the byte array using an empty password, or the administrator password currently set in SEB or asks for the password used for encrypting this SEB file for configuring the client

DecryptDataWithPublicKeyHashPrefix ( byte sebData, bool forEditing, X509Certificate2 &sebFileCertificateRef ) : byte[]

Helper method which fetches the public key hash from a byte array, retrieves the according cryptographic identity from the certificate store and returns the decrypted bytes

GetPreferencesDictFromConfigData ( byte sebData, bool forEditing ) : Dictionary,System.Collections.Generic

Helper method: Get preferences dictionary from decrypted data. In editing mode, users have to enter the right SEB administrator password before they can access the settings contents and returns the decrypted bytes

askForPasswordAndCompareToHashedPassword ( string sebFileHashedAdminPassword, bool forEditing ) : bool

Ask user to enter password and compare it to the passed (hashed) password string Returns true if correct password was entered

메소드 상세

DecryptSEBSettings() 공개 정적인 메소드

Decrypt and deserialize SEB settings When forEditing = true, then the decrypting password the user entered and/or certificate reference found in the .seb file is returned
public static DecryptSEBSettings ( byte sebData, bool forEditing, string &sebFilePassword, bool &passwordIsHash, X509Certificate2 &sebFileCertificateRef ) : Dictionary,System.Collections.Generic
sebData byte
forEditing bool
sebFilePassword string
passwordIsHash bool
sebFileCertificateRef System.Security.Cryptography.X509Certificates.X509Certificate2
리턴 Dictionary,System.Collections.Generic

EncryptDataUsingIdentity() 공개 정적인 메소드

Encrypt preferences using a certificate
public static EncryptDataUsingIdentity ( byte data, X509Certificate2 certificateRef ) : byte[]
data byte
certificateRef System.Security.Cryptography.X509Certificates.X509Certificate2
리턴 byte[]

EncryptDataUsingPassword() 공개 정적인 메소드

Encrypt preferences using a password
public static EncryptDataUsingPassword ( byte data, string password, bool passwordIsHash, SEBSettings configPurpose ) : byte[]
data byte
password string
passwordIsHash bool
configPurpose SEBSettings
리턴 byte[]

EncryptSEBSettingsWithCredentials() 공개 정적인 메소드

Show SEB Password Dialog Form. Read SEB settings from UserDefaults and encrypt them using provided security credentials
public static EncryptSEBSettingsWithCredentials ( string settingsPassword, bool passwordIsHash, X509Certificate2 certificateRef, SEBSettings configPurpose, bool forEditing ) : byte[]
settingsPassword string
passwordIsHash bool
certificateRef System.Security.Cryptography.X509Certificates.X509Certificate2
configPurpose SEBSettings
forEditing bool
리턴 byte[]

GetPrefixDataFromData() 공개 정적인 메소드

Helper method for stripping (and returning) a prefix byte array of prefixLength from a data byte array which is returned without the stripped prefix
public static GetPrefixDataFromData ( byte &data, int prefixLength ) : byte[]
data byte
prefixLength int
리턴 byte[]

GetPrefixStringFromData() 공개 정적인 메소드

Helper method for returning a prefix string (of PREFIX_LENGTH, currently 4 chars) from a data byte array which is returned without the stripped prefix
public static GetPrefixStringFromData ( byte &data ) : string
data byte
리턴 string

StoreDecryptedSEBSettings() 공개 정적인 메소드

Decrypt, parse and use new SEB settings
public static StoreDecryptedSEBSettings ( byte sebData ) : bool
sebData byte
리턴 bool

프로퍼티 상세

sebPasswordDialogForm 공개적으로 정적으로 프로퍼티

public static SebPasswordDialogForm sebPasswordDialogForm
리턴 SebPasswordDialogForm