public byte[] Decrypt(byte[] buf, int length) { lock (encryptLockObj) { if (dispose) { throw new Exception("decryptCTX has been Dispose"); } switch (method) { case "table": for (int i = 0; i < length; i++) { buf[i] = decryptTable[buf[i]]; } return(byteArrayWith(buf, length)); case "rc4": rc4.Decrypt(decryptTable, buf, length); return(byteArrayWith(buf, length)); default: return(sslDecrypt(buf, length)); } } }
public void Decrypt(byte[] buf, int length) { switch (method) { case TYPE_TABLE: for (int i = 0; i < length; i++) { buf[i] = decryptTable[buf[i]]; } break; case TYPE_RC4: rc4.Decrypt(decryptTable, buf, length); break; } }
public byte[] Decrypt(byte[] buf, int length) { lock (LockObj) { switch (method) { case "table": for (int i = 0; i < length; i++) { buf[i] = decryptTable[buf[i]]; } return(byteArrayWith(buf, length)); case "rc4": rc4.Decrypt(decryptTable, buf, length); return(byteArrayWith(buf, length)); default: return(sslDecrypt(buf, length)); } } }