C# 클래스 KeePassLib.Security.ProtectedString

Represents an in-memory encrypted string.
파일 보기 프로젝트 열기: cappert/keepass2 1 사용 예제들

공개 메소드들

메소드 설명
Insert ( int iStart, string strInsert ) : ProtectedString
ProtectedString ( ) : System

Construct a new protected string object. Protection is disabled.

ProtectedString ( bool bEnableProtection, KeePassLib.Security.XorredBuffer xbProtected ) : System

Construct a new protected string. The string is initialized to the value passed in the XorredBuffer object.

ProtectedString ( bool bEnableProtection, byte vUtf8Value ) : System

Construct a new protected string. The string is initialized to the value supplied in the parameters (UTF-8 encoded string).

ProtectedString ( bool bEnableProtection, string strValue ) : System

Construct a new protected string. The string is initialized to the value supplied in the parameters.

ReadString ( ) : string

Convert the protected string to a normal string object. Be careful with this function, the returned string object isn't protected anymore and stored in plain-text in the process memory.

ReadUtf8 ( ) : byte[]

Read out the string and return a byte array that contains the string encoded using UTF-8. The returned string is not protected anymore!

ReadXorredString ( KeePassLib.Cryptography.CryptoRandomStream crsRandomSource ) : byte[]

Read the protected string and return it protected with a sequence of bytes generated by a random stream.

Remove ( int iStart, int nCount ) : ProtectedString
WithProtection ( bool bProtect ) : ProtectedString

비공개 메소드들

메소드 설명
Init ( bool bEnableProtection, byte pbUtf8 ) : void
Init ( bool bEnableProtection, string str ) : void

메소드 상세

Insert() 공개 메소드

public Insert ( int iStart, string strInsert ) : ProtectedString
iStart int
strInsert string
리턴 ProtectedString

ProtectedString() 공개 메소드

Construct a new protected string object. Protection is disabled.
public ProtectedString ( ) : System
리턴 System

ProtectedString() 공개 메소드

Construct a new protected string. The string is initialized to the value passed in the XorredBuffer object.
public ProtectedString ( bool bEnableProtection, KeePassLib.Security.XorredBuffer xbProtected ) : System
bEnableProtection bool Enable protection or not.
xbProtected KeePassLib.Security.XorredBuffer XorredBuffer object containing the /// string in UTF-8 representation. The UTF-8 string must not /// be null-terminated.
리턴 System

ProtectedString() 공개 메소드

Construct a new protected string. The string is initialized to the value supplied in the parameters (UTF-8 encoded string).
public ProtectedString ( bool bEnableProtection, byte vUtf8Value ) : System
bEnableProtection bool If this parameter is true, /// the string will be protected in memory (encrypted). If it /// is false, the string will be stored as plain-text.
vUtf8Value byte The initial string value, encoded as /// UTF-8 byte array. This parameter won't be modified; the caller /// is responsible for clearing it.
리턴 System

ProtectedString() 공개 메소드

Construct a new protected string. The string is initialized to the value supplied in the parameters.
public ProtectedString ( bool bEnableProtection, string strValue ) : System
bEnableProtection bool If this parameter is true, /// the string will be protected in memory (encrypted). If it /// is false, the string will be stored as plain-text.
strValue string The initial string value.
리턴 System

ReadString() 공개 메소드

Convert the protected string to a normal string object. Be careful with this function, the returned string object isn't protected anymore and stored in plain-text in the process memory.
public ReadString ( ) : string
리턴 string

ReadUtf8() 공개 메소드

Read out the string and return a byte array that contains the string encoded using UTF-8. The returned string is not protected anymore!
public ReadUtf8 ( ) : byte[]
리턴 byte[]

ReadXorredString() 공개 메소드

Read the protected string and return it protected with a sequence of bytes generated by a random stream.
public ReadXorredString ( KeePassLib.Cryptography.CryptoRandomStream crsRandomSource ) : byte[]
crsRandomSource KeePassLib.Cryptography.CryptoRandomStream Random number source.
리턴 byte[]

Remove() 공개 메소드

public Remove ( int iStart, int nCount ) : ProtectedString
iStart int
nCount int
리턴 ProtectedString

WithProtection() 공개 메소드

public WithProtection ( bool bProtect ) : ProtectedString
bProtect bool
리턴 ProtectedString