Back to "المزيد عن رحلتي إلى عالم ASP"

This is a viewer only at the moment see the article on how this works.

To update the preview hit Ctrl-Alt-R (or ⌘-Alt-R on Mac) or Enter to refresh. The Save icon lets you save the markdown file to disk

This is a preview from the server running through my markdig pipeline

ASP.NET Imported mostlylucidcouk Security

المزيد عن رحلتي إلى عالم ASP

Sunday, 29 February 2004

كتبت في الوظيفة السابقة كنت أخطط للقيام بتجربة مع حالة الرؤية, توسيع الأشياء التي قمت بها ' في الضغط إلى التشفير والتوقيع وهلمجرا . .... حسناً هناك . ' أخبار جيدة و سيئة لهذا الخطة . خسرت النموذج للقيام بالسلسلة الفعلية للجسم ... يستخدم الرمز التالي لفعل هذا ( شكرا مرة أخرى إلى المحتاج المنظّر) :

internal void CompleteTransforms(TextWriter output, bool enableMac, byte[] macKey)
{ int num1;
byte[] array1;
string text1;
char[] array2;
string text2;
num1 = 0;
if (this._recyclable)
{
 this._byteBuffer = ((byte[]) LosWriter._byteBufferAllocator.GetBuffer());
if (this._freePos > 0)
{
 num1 = Encoding.UTF8.GetBytes(this._charBuffer, 0, this._freePos, this._byteBuffer, 0);
 
}
if (enableMac)
{
 array1 = MachineKey.GetEncodedData(this._byteBuffer, macKey, 0, &(num1));
text1 = Convert.ToBase64String(array1, 0, num1);
output.Write(text1);
return; 
}
array2 = ((char[]) LosWriter._charBufferAllocatorBase64.GetBuffer());
num1 = Convert.ToBase64CharArray(this._byteBuffer, 0, num1, array2, 0);
output.Write(array2, 0, num1);
LosWriter._charBufferAllocatorBase64.ReuseBuffer(array2);
return; 
}
this._byteBuffer = Encoding.UTF8.GetBytes(this._charBuffer, 0, this._freePos);
num1 = this._byteBuffer.Length;
if (enableMac)
{
 this._byteBuffer = MachineKey.GetEncodedData(this._byteBuffer, macKey, 0, &(num1));
 
}
text2 = Convert.ToBase64String(this._byteBuffer);
output.Write(text2);
 
}

كما ترون على الأرجح , هذا الرمز يتعامل مع تطبيق مفاتيح الماك و التشفير إلى البيانات المتسلسلة . هذا هو الرمز الذي يستخدمه | ' | MachineKey |' | perform the encryption

internal static byte[] EncryptOrDecryptData(bool fEncrypt, byte[] buf, byte[] modifier, int start, int length)
{ MemoryStream stream1;
ICryptoTransform transform1;
CryptoStream stream2;
byte[] array1;
byte[] array2;
MachineKey.EnsureConfig();
stream1 = new MemoryStream();
transform1 = MachineKey.GetCryptoTransform(fEncrypt);
stream2 = new CryptoStream(stream1, transform1, 1);
stream2.Write(buf, start, length);
if (fEncrypt && (modifier != null))
{
 stream2.Write(modifier, 0, modifier.Length);
 
}
stream2.FlushFinalBlock();
array1 = stream1.ToArray();
stream2.Close();
MachineKey.ReturnCryptoTransform(fEncrypt, transform1);
if (!fEncrypt && (modifier != null))
{
 array2 = new byte[((uint) (array1.Length - modifier.Length))];
Buffer.BlockCopy(array1, 0, array2, 0, array2.Length);
array1 = array2;
 
}
return array1; 
} 

لسوء الحظ , هذا يعني أنني ' سأضطر إلى اللعب حول التعكس ♫ / رمي المصدر من الم Refelector | / أعيد اختراع كيفية عمل هذا تماماً للذهاب أبعد بكثير مع تعديل حالتي البصرية ♫, يا إلهي ♫

في نهاية المطاف سأضطر إلى التسامح وكتابة مقال في الواقع في أحد هذه الأيام. مشكلة بالنسبة لي هي تنظيم الشيء بحيث يكون قابلا للقراءة للأشخاص الغير مهتمين.

logo

© 2026 Scott Galloway — Unlicense — All content and source code on this site is free to use, copy, modify, and sell.