C# 클래스 dlech.SshAgentLib.Util

PageantSharp utility class.
파일 보기 프로젝트 열기: dlech/SshAgentLib

공개 메소드들

메소드 설명
ClearByteList ( List list ) : void

writes over all values in list with 0 then call list.Clear()

FromBase64 ( byte base64Data ) : byte[]
FromBase64 ( string base64String ) : byte[]
FromHex ( string base16String ) : byte[]

converts string of hexadecimal characters to a byte[] two characters are converted into one byte

FromHex ( string base16String, string delimeter ) : byte[]

converts string of hexadecimal characters to a byte[] two characters are converted into one byte

GetDataType ( this aConstraint ) : Type

Gets the Type of the Data object for a given Agent.KeyConstraintType

ModMinusOne ( PinnedArray a, PinnedArray b ) : PinnedArray

Computes a % (b -1) of 2 large numbers

ToBase64 ( this binaryData ) : byte[]
ToBytes ( this aInt ) : byte[]

Convert 32 bit integer to four bytes in BigEndian order

ToHexString ( this bytes ) : string

Converts array of bytes to a string of hexadecimal digits delimited by':'. Alpha digits will be lower case.

ToHexString ( this bytes, string delimeter ) : string

Converts array of bytes to a string of hexadecimal digits. Alpha digits will be lower case.

ToInt ( this aBytes ) : UInt32

Converts 4 bytes in BigEndian order to 32 bit integer

ToInt ( this aBytes, int aOffset ) : UInt32

Converts 4 bytes in BigEndian order to 32 bit integer

TrimLeadingZero ( PinnedArray array ) : void

removes leading element from array if the value of that element is 0

UnicodeToAnsi ( this unicodeChar ) : byte

Unicode char to to ANSI char.

Based on http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit1252.txt

WriteBlob ( this aStream, BlobBuilder aBuilder ) : void

Writes aBuiler data to aStream at current position of aStream

addConfirmConstraint ( this aKeyCollection ) : void

Adds Agent.KeyConstraintType.SSH_AGENT_CONSTRAIN_CONFIRM constraint to key

addLifetimeConstraint ( this aKeyCollection, uint aLifetime ) : void

Adds Agent.KeyConstraintType.SSH_AGENT_CONSTRAIN_LIFETIME constraint to key

비공개 메소드들

메소드 설명
CompareBigInt ( byte a, byte b, int bShift ) : int

Compares to BigInts

GenericTransform ( ICryptoTransform transform, byte data ) : byte[]
SubtractBigInt ( byte a, byte b, int bShift ) : byte[]

Compute a - b, assumes that a > b<<bShift

메소드 상세

ClearByteList() 공개 정적인 메소드

writes over all values in list with 0 then call list.Clear()
public static ClearByteList ( List list ) : void
list List list to be cleared
리턴 void

FromBase64() 공개 정적인 메소드

public static FromBase64 ( byte base64Data ) : byte[]
base64Data byte
리턴 byte[]

FromBase64() 공개 정적인 메소드

public static FromBase64 ( string base64String ) : byte[]
base64String string
리턴 byte[]

FromHex() 공개 정적인 메소드

converts string of hexadecimal characters to a byte[] two characters are converted into one byte
thrown if base16String is null or empty thrown if base16String does not contain an even number of characters /// or if the characters are not hexadecimal digits (0-9 and A-F or a-f)
public static FromHex ( string base16String ) : byte[]
base16String string the string to convert
리턴 byte[]

FromHex() 공개 정적인 메소드

converts string of hexadecimal characters to a byte[] two characters are converted into one byte
thrown if base16String is null or empty thrown if base16String does not contain an even number of characters /// or if the characters are not hexadecimal digits (0-9 and A-F or a-f)
public static FromHex ( string base16String, string delimeter ) : byte[]
base16String string the string to convert
delimeter string the delimiter that is present between each pair of digits
리턴 byte[]

GetDataType() 공개 정적인 메소드

Gets the Type of the Data object for a given Agent.KeyConstraintType
public static GetDataType ( this aConstraint ) : Type
aConstraint this
리턴 System.Type

ModMinusOne() 공개 정적인 메소드

Computes a % (b -1) of 2 large numbers
public static ModMinusOne ( PinnedArray a, PinnedArray b ) : PinnedArray
a PinnedArray variable a
b PinnedArray variable b
리턴 PinnedArray

ToBase64() 공개 정적인 메소드

public static ToBase64 ( this binaryData ) : byte[]
binaryData this
리턴 byte[]

ToBytes() 공개 정적인 메소드

Convert 32 bit integer to four bytes in BigEndian order
public static ToBytes ( this aInt ) : byte[]
aInt this integer to convert
리턴 byte[]

ToHexString() 공개 정적인 메소드

Converts array of bytes to a string of hexadecimal digits delimited by':'. Alpha digits will be lower case.
public static ToHexString ( this bytes ) : string
bytes this the byte[] to convert
리턴 string

ToHexString() 공개 정적인 메소드

Converts array of bytes to a string of hexadecimal digits. Alpha digits will be lower case.
public static ToHexString ( this bytes, string delimeter ) : string
bytes this the byte[] to convert
delimeter string a delimiter to insert in-between each pair of digits
리턴 string

ToInt() 공개 정적인 메소드

Converts 4 bytes in BigEndian order to 32 bit integer
public static ToInt ( this aBytes ) : UInt32
aBytes this array of bytes
리턴 System.UInt32

ToInt() 공개 정적인 메소드

Converts 4 bytes in BigEndian order to 32 bit integer
public static ToInt ( this aBytes, int aOffset ) : UInt32
aBytes this array of bytes
aOffset int the offset where to start reading the bytes
리턴 System.UInt32

TrimLeadingZero() 공개 정적인 메소드

removes leading element from array if the value of that element is 0
public static TrimLeadingZero ( PinnedArray array ) : void
array PinnedArray
리턴 void

UnicodeToAnsi() 공개 정적인 메소드

Unicode char to to ANSI char.
Based on http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit1252.txt
public static UnicodeToAnsi ( this unicodeChar ) : byte
unicodeChar this /// Unicode char. ///
리턴 byte

WriteBlob() 공개 정적인 메소드

Writes aBuiler data to aStream at current position of aStream
public static WriteBlob ( this aStream, BlobBuilder aBuilder ) : void
aStream this Stream to write to
aBuilder BlobBuilder BlobBuilder to use
리턴 void

addConfirmConstraint() 공개 정적인 메소드

Adds Agent.KeyConstraintType.SSH_AGENT_CONSTRAIN_CONFIRM constraint to key
public static addConfirmConstraint ( this aKeyCollection ) : void
aKeyCollection this
리턴 void

addLifetimeConstraint() 공개 정적인 메소드

Adds Agent.KeyConstraintType.SSH_AGENT_CONSTRAIN_LIFETIME constraint to key
public static addLifetimeConstraint ( this aKeyCollection, uint aLifetime ) : void
aKeyCollection this
aLifetime uint
리턴 void