C# 클래스 Argentini.Halide.H3Secure

The H3Secure class contains methods and properties for performing or evaluating security and authentication related operations. Make sure that you customize the halideEncryptionBaseKey and halideEncryptionInitVector values in the Halide.config file. This should be done for each site in which Halide is used. The halideEncryptionBaseKey attribute is an array of 24 8-bit numeric values (0-255), and the halideEncryptionInitVector attribute is an array of 18 8-bit numeric values (0-255). These values are used to seed and generate encrypted data when using any of the encryption methods within the H3Secure class.
파일 보기 프로젝트 열기: argentini/Halide

공개 메소드들

메소드 설명
Base64PlusStringDecode ( string input ) : String

Base64+ decodes a string (valid in REST URL). Handles missing padding characters.

Base64PlusStringDecodeToBytes ( string input ) : byte[]

Base64+ decodes a string (valid in REST URL). Handles missing padding characters.

Base64PlusStringEncode ( byte input ) : String

Base64+ encodes a string (valid in REST URL).

Base64PlusStringEncode ( string input ) : String

Base64+ encodes a string (valid in REST URL).

Base64StringDecode ( string input ) : String

Base64 decodes a string.

Base64StringEncode ( string input ) : String

Base64 encodes a string.

CreateBaseKey ( String key ) : Byte[]

Converts a comma-separated string of 24 8-bit values and converts it into a Byte array.

CreateInitVector ( String key ) : Byte[]

Converts a comma-separated string of 18 8-bit values and converts it into a Byte array.

Decrypt ( String data ) : String

Triple DES 256 bit string decryption.

Decrypt ( String data, Byte key ) : String

Triple DES 256 bit string decryption.

Decrypt ( String data, Byte key, Byte ivec ) : String

Triple DES 256 bit string decryption.

Decrypt ( String data, String key, String ivec ) : String

Triple DES 256 bit string decryption.

DecryptInt32 ( String data ) : Int32?

Triple DES 256 bit integer decryption.

DecryptInt32 ( String data, Byte key ) : Int32?

Triple DES 256 bit integer decryption.

DecryptInt32 ( String data, Byte key, Byte ivec ) : Int32?

Triple DES 256 bit integer decryption.

DecryptInt32 ( String data, String key, String ivec ) : Int32?

Triple DES 256 bit integer decryption.

DecryptInt64 ( String data ) : Int64?

Triple DES 256 bit long integer (Int64) decryption.

DecryptInt64 ( String data, Byte key ) : Int64?

Triple DES 256 bit long integer (Int64) decryption.

DecryptInt64 ( String data, Byte key, Byte ivec ) : Int64?

Triple DES 256 bit long integer (Int64) decryption.

DecryptInt64 ( String data, String key, String ivec ) : Int64?

Triple DES 256 bit long integer (Int64) decryption.

Encrypt ( String data ) : String

Triple DES 256 bit string encryption.

Encrypt ( String data, Byte key ) : String

Triple DES 256 bit string encryption.

Encrypt ( String data, Byte key, Byte ivec ) : String

Triple DES 256 bit string encryption.

Encrypt ( String data, String key, String ivec ) : String

Triple DES 256 bit string encryption.

EncryptInt32 ( Int32 data ) : String

Triple DES 256 bit encryption of 32-bit integers.

EncryptInt32 ( Int32 data, Byte key ) : String

Triple DES 256 bit encryption of 32-bit integers.

EncryptInt32 ( Int32 data, Byte key, Byte ivec ) : String

Triple DES 256 bit encryption of 32-bit integers.

EncryptInt32 ( Int32 data, String key, String ivec ) : String

Triple DES 256 bit encryption of 32-bit integers.

EncryptInt64 ( System.Int64 data ) : String

Triple DES 256 bit encryption of 64-bit integers.

EncryptInt64 ( System.Int64 data, Byte key ) : String

Triple DES 256 bit encryption of 64-bit integers.

EncryptInt64 ( System.Int64 data, Byte key, Byte ivec ) : String

Triple DES 256 bit encryption of 64-bit integers.

EncryptInt64 ( System.Int64 data, String key, String ivec ) : String

Triple DES 256 bit encryption of 64-bit integers.

GenerateKey ( Int32 count ) : String

Generate a comma-separated string of 8-bit values for an encryption base key. The value is not guaranteed to be unique.

GetCurrentUser ( ) : String

Get the currently logged-in user name (with domain) from the client.

GetIdentity ( ) : String

Get the currently logged-in user name (with domain) for the running web page.

Impersonate ( ) : System.Boolean

Begins impersonation of an authenticated user on the server, so your page will have non-anonymous permissions (e.g. to write files, etc.).

Impersonate ( String domain, String userName, String password ) : System.Boolean

Begins impersonation of an authenticated user on the server, so your page will have non-anonymous permissions (e.g. to write files, etc.).

MD5String ( string input ) : String

MD5 encodes the passed string.

MD5VerifyString ( string input, string hash ) : System.Boolean

Verified a string against the passed MD5 hash.

TinyDecrypt ( string input ) : String

Decrypt a string encrypted with TinyEncrypt. Ideal for passing parameters on a URL. If you need strong encryption, do not use this method.

TinyEncrypt ( string input ) : String

Encrypt a string using a simple XOR and Base64 Encode. Ideal for passing parameters on a URL. If you need strong encryption, do not use this method.

UnImpersonate ( ) : void

Ends impersonation of an authenticated user on the server, reverting back to an anonymous, default, network service account.

비공개 메소드들

메소드 설명
CloseHandle ( IntPtr handle ) : bool
EncryptDecrypt ( string textToEncrypt ) : String
H3Secure ( ) : System
LogonUser ( string principal, string authority, string password, LogonSessionType logonType, LogonProvider logonProvider, IntPtr &token ) : bool

메소드 상세

Base64PlusStringDecode() 공개 정적인 메소드

Base64+ decodes a string (valid in REST URL). Handles missing padding characters.
public static Base64PlusStringDecode ( string input ) : String
input string A base64+ encoded string.
리턴 String

Base64PlusStringDecodeToBytes() 공개 정적인 메소드

Base64+ decodes a string (valid in REST URL). Handles missing padding characters.
public static Base64PlusStringDecodeToBytes ( string input ) : byte[]
input string A base64+ encoded string.
리턴 byte[]

Base64PlusStringEncode() 공개 정적인 메소드

Base64+ encodes a string (valid in REST URL).
public static Base64PlusStringEncode ( byte input ) : String
input byte A byte array to encode.
리턴 String

Base64PlusStringEncode() 공개 정적인 메소드

Base64+ encodes a string (valid in REST URL).
public static Base64PlusStringEncode ( string input ) : String
input string A string to encode.
리턴 String

Base64StringDecode() 공개 정적인 메소드

Base64 decodes a string.
public static Base64StringDecode ( string input ) : String
input string A base64 encoded string.
리턴 String

Base64StringEncode() 공개 정적인 메소드

Base64 encodes a string.
public static Base64StringEncode ( string input ) : String
input string A string to encode.
리턴 String

CreateBaseKey() 공개 정적인 메소드

Converts a comma-separated string of 24 8-bit values and converts it into a Byte array.
public static CreateBaseKey ( String key ) : Byte[]
key String 32 8-bit values in a comma-separated list.
리턴 Byte[]

CreateInitVector() 공개 정적인 메소드

Converts a comma-separated string of 18 8-bit values and converts it into a Byte array.
public static CreateInitVector ( String key ) : Byte[]
key String 18 8-bit values in a comma-separated list.
리턴 Byte[]

Decrypt() 공개 정적인 메소드

Triple DES 256 bit string decryption.
public static Decrypt ( String data ) : String
data String String to decrypt.
리턴 String

Decrypt() 공개 정적인 메소드

Triple DES 256 bit string decryption.
public static Decrypt ( String data, Byte key ) : String
data String String to decrypt.
key Byte 24 byte array key for decrypting the data. This must match the key used to encrypt the data.
리턴 String

Decrypt() 공개 정적인 메소드

Triple DES 256 bit string decryption.
public static Decrypt ( String data, Byte key, Byte ivec ) : String
data String String to decrypt.
key Byte 24 byte array key for decrypting the data. This must match the key used to encrypt the data.
ivec Byte 18 byte array init vector for decrypting the data. This must match the init vector used to encrypt the data.
리턴 String

Decrypt() 공개 정적인 메소드

Triple DES 256 bit string decryption.
public static Decrypt ( String data, String key, String ivec ) : String
data String String to decrypt.
key String 24 byte key string for decrypting the data. This must match the key used to encrypt the data.
ivec String 18 byte initialization vector string for the decryption routine. This must match the init vector used to encrypt the data.
리턴 String

DecryptInt32() 공개 정적인 메소드

Triple DES 256 bit integer decryption.
public static DecryptInt32 ( String data ) : Int32?
data String String to decrypt.
리턴 Int32?

DecryptInt32() 공개 정적인 메소드

Triple DES 256 bit integer decryption.
public static DecryptInt32 ( String data, Byte key ) : Int32?
data String String to decrypt.
key Byte 24 byte array key for decrypting the data. This must match the key used to encrypt the data.
리턴 Int32?

DecryptInt32() 공개 정적인 메소드

Triple DES 256 bit integer decryption.
public static DecryptInt32 ( String data, Byte key, Byte ivec ) : Int32?
data String String to decrypt.
key Byte 24 byte array key for decrypting the data. This must match the key used to encrypt the data.
ivec Byte 18 byte array init vector for decrypting the data. This must match the init vector used to encrypt the data.
리턴 Int32?

DecryptInt32() 공개 정적인 메소드

Triple DES 256 bit integer decryption.
public static DecryptInt32 ( String data, String key, String ivec ) : Int32?
data String String to decrypt.
key String 24 byte key string for decrypting the data. This must match the key used to encrypt the data.
ivec String 18 byte initialization vector string for the decryption routine. This must match the init vector used to encrypt the data.
리턴 Int32?

DecryptInt64() 공개 정적인 메소드

Triple DES 256 bit long integer (Int64) decryption.
public static DecryptInt64 ( String data ) : Int64?
data String String to decrypt.
리턴 Int64?

DecryptInt64() 공개 정적인 메소드

Triple DES 256 bit long integer (Int64) decryption.
public static DecryptInt64 ( String data, Byte key ) : Int64?
data String String to decrypt.
key Byte 24 byte array key for decrypting the data. This must match the key used to encrypt the data.
리턴 Int64?

DecryptInt64() 공개 정적인 메소드

Triple DES 256 bit long integer (Int64) decryption.
public static DecryptInt64 ( String data, Byte key, Byte ivec ) : Int64?
data String String to decrypt.
key Byte 24 byte array key for decrypting the data. This must match the key used to encrypt the data.
ivec Byte 18 byte array init vector for decrypting the data. This must match the init vector used to encrypt the data.
리턴 Int64?

DecryptInt64() 공개 정적인 메소드

Triple DES 256 bit long integer (Int64) decryption.
public static DecryptInt64 ( String data, String key, String ivec ) : Int64?
data String String to decrypt.
key String 24 byte key string for decrypting the data. This must match the key used to encrypt the data.
ivec String 18 byte initialization vector string for the decryption routine. This must match the init vector used to encrypt the data.
리턴 Int64?

Encrypt() 공개 정적인 메소드

Triple DES 256 bit string encryption.
public static Encrypt ( String data ) : String
data String String to encrypt.
리턴 String

Encrypt() 공개 정적인 메소드

Triple DES 256 bit string encryption.
public static Encrypt ( String data, Byte key ) : String
data String String to encrypt.
key Byte 24 byte array key for encrypting the data.
리턴 String

Encrypt() 공개 정적인 메소드

Triple DES 256 bit string encryption.
public static Encrypt ( String data, Byte key, Byte ivec ) : String
data String String to encrypt.
key Byte 24 byte array key for encrypting the data.
ivec Byte 18 byte array initialization vector for the encryption routine.
리턴 String

Encrypt() 공개 정적인 메소드

Triple DES 256 bit string encryption.
public static Encrypt ( String data, String key, String ivec ) : String
data String String to encrypt.
key String 32 byte key string for encrypting the data.
ivec String 16 byte initialization vector string for the encryption routine.
리턴 String

EncryptInt32() 공개 정적인 메소드

Triple DES 256 bit encryption of 32-bit integers.
public static EncryptInt32 ( Int32 data ) : String
data System.Int32 Integer to encrypt.
리턴 String

EncryptInt32() 공개 정적인 메소드

Triple DES 256 bit encryption of 32-bit integers.
public static EncryptInt32 ( Int32 data, Byte key ) : String
data System.Int32 Integer to encrypt.
key Byte 24 byte array key for encrypting the data.
리턴 String

EncryptInt32() 공개 정적인 메소드

Triple DES 256 bit encryption of 32-bit integers.
public static EncryptInt32 ( Int32 data, Byte key, Byte ivec ) : String
data System.Int32 Integer to encrypt.
key Byte 24 byte array key for encrypting the data.
ivec Byte 18 byte array initialization vector for the encryption routine.
리턴 String

EncryptInt32() 공개 정적인 메소드

Triple DES 256 bit encryption of 32-bit integers.
public static EncryptInt32 ( Int32 data, String key, String ivec ) : String
data System.Int32 Integer to encrypt.
key String 24 byte key string for encrypting the data.
ivec String 18 byte initialization vector string for the encryption routine.
리턴 String

EncryptInt64() 공개 정적인 메소드

Triple DES 256 bit encryption of 64-bit integers.
public static EncryptInt64 ( System.Int64 data ) : String
data System.Int64 Long integer to encrypt.
리턴 String

EncryptInt64() 공개 정적인 메소드

Triple DES 256 bit encryption of 64-bit integers.
public static EncryptInt64 ( System.Int64 data, Byte key ) : String
data System.Int64 Long integer to encrypt.
key Byte 24 byte array key for encrypting the data.
리턴 String

EncryptInt64() 공개 정적인 메소드

Triple DES 256 bit encryption of 64-bit integers.
public static EncryptInt64 ( System.Int64 data, Byte key, Byte ivec ) : String
data System.Int64 Long integer to encrypt.
key Byte 24 byte array key for encrypting the data.
ivec Byte 18 byte array initialization vector for the encryption routine.
리턴 String

EncryptInt64() 공개 정적인 메소드

Triple DES 256 bit encryption of 64-bit integers.
public static EncryptInt64 ( System.Int64 data, String key, String ivec ) : String
data System.Int64 Long integer to encrypt.
key String 24 byte key string for encrypting the data.
ivec String 18 byte initialization vector string for the encryption routine.
리턴 String

GenerateKey() 공개 정적인 메소드

Generate a comma-separated string of 8-bit values for an encryption base key. The value is not guaranteed to be unique.
public static GenerateKey ( Int32 count ) : String
count System.Int32 Number of 8-bit numbers to generate
리턴 String

GetCurrentUser() 공개 정적인 메소드

Get the currently logged-in user name (with domain) from the client.
public static GetCurrentUser ( ) : String
리턴 String

GetIdentity() 공개 정적인 메소드

Get the currently logged-in user name (with domain) for the running web page.
public static GetIdentity ( ) : String
리턴 String

Impersonate() 공개 정적인 메소드

Begins impersonation of an authenticated user on the server, so your page will have non-anonymous permissions (e.g. to write files, etc.).
public static Impersonate ( ) : System.Boolean
리턴 System.Boolean

Impersonate() 공개 정적인 메소드

Begins impersonation of an authenticated user on the server, so your page will have non-anonymous permissions (e.g. to write files, etc.).
public static Impersonate ( String domain, String userName, String password ) : System.Boolean
domain String Domain name.
userName String User name.
password String password.
리턴 System.Boolean

MD5String() 공개 정적인 메소드

MD5 encodes the passed string.
public static MD5String ( string input ) : String
input string The string to encode.
리턴 String

MD5VerifyString() 공개 정적인 메소드

Verified a string against the passed MD5 hash.
public static MD5VerifyString ( string input, string hash ) : System.Boolean
input string The string to compare.
hash string The hash to compare against.
리턴 System.Boolean

TinyDecrypt() 공개 정적인 메소드

Decrypt a string encrypted with TinyEncrypt. Ideal for passing parameters on a URL. If you need strong encryption, do not use this method.
public static TinyDecrypt ( string input ) : String
input string Encrypted string value to decrypt.
리턴 String

TinyEncrypt() 공개 정적인 메소드

Encrypt a string using a simple XOR and Base64 Encode. Ideal for passing parameters on a URL. If you need strong encryption, do not use this method.
public static TinyEncrypt ( string input ) : String
input string String value to encrypt.
리턴 String

UnImpersonate() 공개 정적인 메소드

Ends impersonation of an authenticated user on the server, reverting back to an anonymous, default, network service account.
public static UnImpersonate ( ) : void
리턴 void