TCipherInputStream 類別 參考文件

#include <InputStream.h>

類別TCipherInputStream的繼承圖:

TFilterInputStream TInputStream 全部成員列表

公開方法(Public Methods)

 TCipherInputStream (TInputStream *)
 建構子。Stream為實際的資料流來源
 ~TCipherInputStream ()
void SetKey (char *)
 設定鑰匙。此函式會將鑰匙複製到key變數,並將index設為0
virtual int Read (void)
 讀input進來,並解密.
void Reset (void)
 將讀取的位置移到資料流開頭
int Skip (int)
 略過size個byte的資料,並傳回實際上略過的byte數

保護屬性

int keySize
 鑰匙的長度.
char * key
 鑰匙.

私有屬性

int index
 目前用到鑰匙中的第幾個字元

詳細描述

可以對讀取的資料做編碼或還原的動作,每讀取一個byte,便依序和鑰匙中的某一個字元做 XOR 的動作

定義在 InputStream.h 檔案之第 82 行.


建構子與解構子說明文件

TCipherInputStream::TCipherInputStream ( TInputStream  ) 

建構子。Stream為實際的資料流來源

定義在 InputStream.cpp 檔案之第 230 行.

參考 key, 及 SetKey().

TCipherInputStream::~TCipherInputStream (  ) 

定義在 InputStream.cpp 檔案之第 236 行.

參考 key.


函式成員說明文件

int TCipherInputStream::Read ( void   )  [virtual]

讀input進來,並解密.

依據TFilterInputStream重新實作.

定義在 InputStream.cpp 檔案之第 267 行.

參考 index, key, keySize, 及 TFilterInputStream::Read().

void TCipherInputStream::Reset ( void   )  [virtual]

將讀取的位置移到資料流開頭

依據TFilterInputStream重新實作.

定義在 InputStream.cpp 檔案之第 280 行.

參考 index, 及 TFilterInputStream::Reset().

void TCipherInputStream::SetKey ( char *  k  ) 

設定鑰匙。此函式會將鑰匙複製到key變數,並將index設為0

參數:
k 加密的key的值,是一個字串

定義在 InputStream.cpp 檔案之第 247 行.

參考 index, key, 及 keySize.

被參考於 TCipherInputStream().

int TCipherInputStream::Skip ( int   )  [virtual]

略過size個byte的資料,並傳回實際上略過的byte數

依據TFilterInputStream重新實作.

定義在 InputStream.cpp 檔案之第 286 行.

參考 index, keySize, 及 TFilterInputStream::Skip().


資料成員說明文件

int TCipherInputStream::index [private]

目前用到鑰匙中的第幾個字元

定義在 InputStream.h 檔案之第 85 行.

被參考於 Read(), Reset(), SetKey(), 及 Skip().

char* TCipherInputStream::key [protected]

鑰匙.

定義在 InputStream.h 檔案之第 88 行.

被參考於 Read(), SetKey(), TCipherInputStream(), 及 ~TCipherInputStream().

int TCipherInputStream::keySize [protected]

鑰匙的長度.

定義在 InputStream.h 檔案之第 87 行.

被參考於 Read(), SetKey(), 及 Skip().


此類別(class) 文件是由下列檔案中產生:
產生日期:Tue Jul 11 11:52:19 2006, 專案:cbmr, 產生器:  doxygen 1.4.7