Главная страница


ru.nethack

 
 - RU.NETHACK -------------------------------------------------------------------
 From : Dmitry Radishev                      2:5015/42      27 Sep 2003  08:04:43
 To : •®ЄҐа
 Subject : закрытие не используемых портов..
 -------------------------------------------------------------------------------- 
 
 
 Wednesday September 24 2003 17:32, Хокер wrote to Ilya Dikarev:
 
  Х> Правильно, давай лучше пофлеймим о чем-нить топичном :)
 
  Х> Есть rfc на base64.
 
  Hомер?
 
  Х>  Я утверждаю, что в нем не описывается, как
  Х> декодировать и вообще что делать со строками вида "=AAA". Кто что
  Х> думает по этому поводу?
 
  Hу, что-то все-таки описывается. Если ты не перепутал это с quoted-printable
 :-)
 
  RFC 2045 (MIME):
 
 Base64 Content-Transfer-Encoding
 [...]
    A 65-character subset of US-ASCII is used, enabling 6 bits to be
    represented per printable character. (The extra 65th character, "=",
    is used to signify a special processing function.)
 [...]
    Special processing is performed if fewer than 24 bits are available
    at the end of the data being encoded.  A full encoding quantum is
    always completed at the end of a body.  When fewer than 24 input bits
    are available in an input group, zero bits are added (on the right)
    to form an integral number of 6-bit groups.  Padding at the end of
    the data is performed using the "=" character.  Since all base64
    input is an integral number of octets, only the following cases can
    arise: (1) the final quantum of encoding input is an integral
    multiple of 24 bits; here, the final unit of encoded output will be
    an integral multiple of 4 characters with no "=" padding, (2) the
    final quantum of encoding input is exactly 8 bits; here, the final
    unit of encoded output will be two characters followed by two "="
    padding characters, or (3) the final quantum of encoding input is
    exactly 16 bits; here, the final unit of encoded output will be three
    characters followed by one "=" padding character.
 
    Because it is used only for padding at the end of the data, the
    occurrence of any "=" characters may be taken as evidence that the
    end of the data has been reached (without truncation in transit).  No
 
    such assurance is possible, however, when the number of octets
    transmitted was a multiple of three and no "=" characters are
    present.
 
    Any characters outside of the base64 alphabet are to be ignored in
    base64-encoded data.
 =========
 
  Сухой остаток: символ "=" может появляться только в конце данных, и может
 служить признаком конца. А значит, по появлению "=" обработка должна
 прерываться.
  Что _именно_ делать, если после "=" идет ещё что-то - действительно не
 написано. Hо - оно точно нужно?
 
  P.S: если речь все-таки идет о QP - то "=АБВ" однозначно интерпретируется как
 шестнадцатеричное значение АБ, и символ "В".
 
 All the best //DiBR                        [TEAM ВСЕ МАСТДАЙ] [шестая базовая]
                                                          [http://dibr.nnov.ru]
 
 --- [LPT] LaMerZ PrOfeSsIoNaL TeaM  /member/
  * Origin: FCC rules! (2:5015/42)
 
 

Вернуться к списку тем, сортированных по: возрастание даты  уменьшение даты  тема  автор 

 Тема:    Автор:    Дата:  
 закрытие не используемых портов..   Dmitry Radishev   27 Sep 2003 08:04:43 
 закрытие не используемых портов..   •®ЄҐа   27 Sep 2003 23:21:09 
Архивное /ru.nethack/18153f755590.html, оценка 2 из 5, голосов 10
Яндекс.Метрика
Valid HTML 4.01 Transitional