C# 클래스 CmisSync.Lib.Config.Crypto

Obfuscation for sensitive data, making password harvesting a little less straightforward. Web browsers employ the same technique to store user passwords.
파일 보기 프로젝트 열기: OpenDataSpace/CmisSync

공개 메소드들

메소드 설명
CalculateChecksum ( string hashAlgorithm, IFileInfo file ) : byte[]

Calculates the checksum over the given stream with a former created hashAlgorithm

CalculateChecksum ( string hashAlgorithm, Stream inputStream ) : byte[]

Calculates the checksum over the given stream.

CreateHashAlgorithm ( string name ) : HashAlgorithm

Creates the hash algorithm by the given name.

Deobfuscate ( string value ) : string

Deobfuscate a string.

GetCryptoKey ( ) : byte[]

Salt for the obfuscation.

Obfuscate ( string value ) : string

Obfuscate a string.

비공개 메소드들

메소드 설명
UnixDeobfuscate ( string value ) : string

Deobfuscate a string on UNIX.

UnixObfuscate ( string value ) : string

Obfuscate a string on Unix. AES is used.

WindowsDeobfuscate ( string value ) : string

Deobfuscate a string on Windows.

WindowsObfuscate ( string value ) : string

Obfuscate a string on Windows. We use the recommended API for this: DPAPI (Windows Data Protection API) http://msdn.microsoft.com/en-us/library/ms995355.aspx Warning: Even though it uses the Windows user's password, it is not uncrackable.

메소드 상세

CalculateChecksum() 공개 정적인 메소드

Calculates the checksum over the given stream with a former created hashAlgorithm
public static CalculateChecksum ( string hashAlgorithm, IFileInfo file ) : byte[]
hashAlgorithm string Hash algorithm.
file IFileInfo File to be hashed.
리턴 byte[]

CalculateChecksum() 공개 정적인 메소드

Calculates the checksum over the given stream.
public static CalculateChecksum ( string hashAlgorithm, Stream inputStream ) : byte[]
hashAlgorithm string Hash algorithm.
inputStream Stream Input Stream.
리턴 byte[]

CreateHashAlgorithm() 공개 정적인 메소드

Creates the hash algorithm by the given name.
public static CreateHashAlgorithm ( string name ) : HashAlgorithm
name string Name of the has algorithm.
리턴 System.Security.Cryptography.HashAlgorithm

Deobfuscate() 공개 정적인 메소드

Deobfuscate a string.
public static Deobfuscate ( string value ) : string
value string The string to deobfuscate
리턴 string

GetCryptoKey() 공개 정적인 메소드

Salt for the obfuscation.
public static GetCryptoKey ( ) : byte[]
리턴 byte[]

Obfuscate() 공개 정적인 메소드

Obfuscate a string.
public static Obfuscate ( string value ) : string
value string The string to obfuscate
리턴 string