iTextSharp.text.pdf.crypto.ARCFOUREncryption.EncryptARCFOUR C# (CSharp) Method

EncryptARCFOUR() public method

public EncryptARCFOUR ( byte data ) : void
data byte
return void
        public void EncryptARCFOUR(byte[] data)
        {
            EncryptARCFOUR(data, 0, data.Length, data, 0);
        }

Same methods

ARCFOUREncryption::EncryptARCFOUR ( byte dataIn, byte dataOut ) : void
ARCFOUREncryption::EncryptARCFOUR ( byte data, int off, int len ) : void
ARCFOUREncryption::EncryptARCFOUR ( byte dataIn, int off, int len, byte dataOut, int offOut ) : void

Usage Example

示例#1
0
 public byte[] Update(byte[] b, int off, int len)
 {
     if (aes)
     {
         if (initiated)
         {
             return(cipher.Update(b, off, len));
         }
         else
         {
             int left = Math.Min(iv.Length - ivptr, len);
             System.Array.Copy(b, off, iv, ivptr, left);
             off   += left;
             len   -= left;
             ivptr += left;
             if (ivptr == iv.Length)
             {
                 cipher    = new AESCipher(false, key, iv);
                 initiated = true;
                 if (len > 0)
                 {
                     return(cipher.Update(b, off, len));
                 }
             }
             return(null);
         }
     }
     else
     {
         byte[] b2 = new byte[len];
         arcfour.EncryptARCFOUR(b, off, len, b2, 0);
         return(b2);
     }
 }
All Usage Examples Of iTextSharp.text.pdf.crypto.ARCFOUREncryption::EncryptARCFOUR