C# 클래스 SebWindowsClient.CryptographyUtils.SEBProtectionController

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

공개 메소드들

메소드 설명
ComputeBrowserExamKey ( ) : string

Compute a Browser Exam Key SHA256 hash base16 string.

ComputeHashForFiles ( IEnumerable fileNames ) : string
ComputePasswordHash ( string input ) : string

Compute a SHA256 hash base16 string.

DecryptDataWithCertificate ( byte encryptedData, X509Certificate2 sebCertificate ) : byte[]

Decrypt with X509 certificate/private key and RSA algorithm

DecryptDataWithPassword ( byte encryptedBytesWithSalt, string passphrase ) : byte[]

Decrypt with password, key, salt using AES (Open SSL Decrypt)..

EncryptDataWithCertificate ( byte plainInputData, X509Certificate2 sebCertificate ) : byte[]

Encrypt with certificate/public key and RSA algorithm

EncryptDataWithPassword ( byte plainData, string password ) : byte[]

Encrypt with password, key, salt using AES (Open SSL Encrypt).

GenerateBrowserExamKeySalt ( ) : byte[]

Generate a Browser Exam Key Salt as byte data.

GetCertificateFromPassedStore ( byte publicKeyHash, X509Store store ) : X509Certificate2

Helper method: Search passed store for certificate with passed public key hash.

GetCertificateFromStore ( byte publicKeyHash ) : X509Certificate2

Get certificate from both stores.

GetCertificatesAndNames ( ArrayList &certificateNames ) : ArrayList

Get array of certificate references and the according names from both certificate stores.

GetCertificatesAndNamesFromStore ( ArrayList &certificateNames, X509Store store ) : ArrayList

Helper method: Get array of certificate references and the according names from the passed certificate store.

GetPublicKeyHashFromCertificate ( X509Certificate2 certificateRef ) : byte[]

Get the public key hash for the certificate from the store.

GetSSLCertificatesAndNames ( ArrayList &certificateNames ) : ArrayList

Get array of CA certificate references and the according names from the certificate store.

Parse ( string data, string delimiter ) : List

Recursively searches the supplied AD string for all groups.

StoreCertificateIntoStore ( byte certificateData ) : void

Store certificate into the store.

비공개 메소드들

메소드 설명
ComputeFileHash ( string file ) : string
ComputeSEBComponentsHash ( ) : string

메소드 상세

ComputeBrowserExamKey() 공개 정적인 메소드

Compute a Browser Exam Key SHA256 hash base16 string.
public static ComputeBrowserExamKey ( ) : string
리턴 string

ComputeHashForFiles() 공개 정적인 메소드

public static ComputeHashForFiles ( IEnumerable fileNames ) : string
fileNames IEnumerable
리턴 string

ComputePasswordHash() 공개 정적인 메소드

Compute a SHA256 hash base16 string.
public static ComputePasswordHash ( string input ) : string
input string
리턴 string

DecryptDataWithCertificate() 공개 정적인 메소드

Decrypt with X509 certificate/private key and RSA algorithm
public static DecryptDataWithCertificate ( byte encryptedData, X509Certificate2 sebCertificate ) : byte[]
encryptedData byte
sebCertificate System.Security.Cryptography.X509Certificates.X509Certificate2
리턴 byte[]

DecryptDataWithPassword() 공개 정적인 메소드

Decrypt with password, key, salt using AES (Open SSL Decrypt)..
public static DecryptDataWithPassword ( byte encryptedBytesWithSalt, string passphrase ) : byte[]
encryptedBytesWithSalt byte
passphrase string
리턴 byte[]

EncryptDataWithCertificate() 공개 정적인 메소드

Encrypt with certificate/public key and RSA algorithm
public static EncryptDataWithCertificate ( byte plainInputData, X509Certificate2 sebCertificate ) : byte[]
plainInputData byte
sebCertificate System.Security.Cryptography.X509Certificates.X509Certificate2
리턴 byte[]

EncryptDataWithPassword() 공개 정적인 메소드

Encrypt with password, key, salt using AES (Open SSL Encrypt).
public static EncryptDataWithPassword ( byte plainData, string password ) : byte[]
plainData byte
password string
리턴 byte[]

GenerateBrowserExamKeySalt() 공개 정적인 메소드

Generate a Browser Exam Key Salt as byte data.
public static GenerateBrowserExamKeySalt ( ) : byte[]
리턴 byte[]

GetCertificateFromPassedStore() 공개 정적인 메소드

Helper method: Search passed store for certificate with passed public key hash.
public static GetCertificateFromPassedStore ( byte publicKeyHash, X509Store store ) : X509Certificate2
publicKeyHash byte
store System.Security.Cryptography.X509Certificates.X509Store
리턴 System.Security.Cryptography.X509Certificates.X509Certificate2

GetCertificateFromStore() 공개 정적인 메소드

Get certificate from both stores.
public static GetCertificateFromStore ( byte publicKeyHash ) : X509Certificate2
publicKeyHash byte
리턴 System.Security.Cryptography.X509Certificates.X509Certificate2

GetCertificatesAndNames() 공개 정적인 메소드

Get array of certificate references and the according names from both certificate stores.
public static GetCertificatesAndNames ( ArrayList &certificateNames ) : ArrayList
certificateNames System.Collections.ArrayList
리턴 System.Collections.ArrayList

GetCertificatesAndNamesFromStore() 공개 정적인 메소드

Helper method: Get array of certificate references and the according names from the passed certificate store.
public static GetCertificatesAndNamesFromStore ( ArrayList &certificateNames, X509Store store ) : ArrayList
certificateNames System.Collections.ArrayList
store System.Security.Cryptography.X509Certificates.X509Store
리턴 System.Collections.ArrayList

GetPublicKeyHashFromCertificate() 공개 정적인 메소드

Get the public key hash for the certificate from the store.
public static GetPublicKeyHashFromCertificate ( X509Certificate2 certificateRef ) : byte[]
certificateRef System.Security.Cryptography.X509Certificates.X509Certificate2
리턴 byte[]

GetSSLCertificatesAndNames() 공개 정적인 메소드

Get array of CA certificate references and the according names from the certificate store.
public static GetSSLCertificatesAndNames ( ArrayList &certificateNames ) : ArrayList
certificateNames System.Collections.ArrayList
리턴 System.Collections.ArrayList

Parse() 공개 정적인 메소드

Recursively searches the supplied AD string for all groups.
public static Parse ( string data, string delimiter ) : List
data string The string returned from AD to parse for a group.
delimiter string The string to use as the seperator for the data. ex. ","
리턴 List

StoreCertificateIntoStore() 공개 정적인 메소드

Store certificate into the store.
public static StoreCertificateIntoStore ( byte certificateData ) : void
certificateData byte
리턴 void