CryptoStream.Write(Byte[], Int32, Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將一串位元組寫入 CryptoStream 當前位元組,並依寫入位元組數將當前位置前進。
public:
override void Write(cli::array <System::Byte> ^ buffer, int offset, int count);
public override void Write(byte[] buffer, int offset, int count);
override this.Write : byte[] * int * int -> unit
Public Overrides Sub Write (buffer As Byte(), offset As Integer, count As Integer)
參數
- buffer
- Byte[]
位元組陣列。 此方法將 count 位元組從 複製 buffer 到目前串流。
- offset
- Int32
開始將位元組複製到目前串流的位元組偏移 buffer 量。
- count
- Int32
目前串流要寫入的位元組數。
例外狀況
與目前CryptoStreamMode物件相關的資料CryptoStream與底層串流不符。 例如,當底層串流為 Write 唯讀時,會拋出此例外。
offset 或 count 小於零。
與count參數的offset總和比緩衝區長度還長。