Data type: Difference between revisions

Jump to navigation Jump to search
1,192 bytes added ,  4 November 2025
m
 
(3 intermediate revisions by the same user not shown)
Line 32: Line 32:
參考資料
參考資料
* [http://support.microsoft.com/kb/208427 最大 URL 長度是在 Internet Explorer 中的 2,083 字元] for {{IE}}<ref>[http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers http - What is the maximum length of a URL in different browsers? - Stack Overflow]</ref><ref>[http://wiert.me/2010/04/20/maximum-url-lengths/ Maximum URL lengths « The Wiert Corner – irregular stream of stuff]</ref>
* [http://support.microsoft.com/kb/208427 最大 URL 長度是在 Internet Explorer 中的 2,083 字元] for {{IE}}<ref>[http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers http - What is the maximum length of a URL in different browsers? - Stack Overflow]</ref><ref>[http://wiert.me/2010/04/20/maximum-url-lengths/ Maximum URL lengths « The Wiert Corner – irregular stream of stuff]</ref>
=== Email ===
* data type:
** MySQL: {{kbd | key=VARCHAR(254)}}<ref>[https://www.rfc-editor.org/rfc/rfc5321 RFC 5321: Simple Mail Transfer Protocol]"4.5.3.1.3.  Path The maximum total length of a reverse-path or forward-path is 256 octets (including the punctuation and element separators)." Complete address in SMTP envelope (including {{kbd | key=<nowiki><...></nowiki>}})</ref>
* 遵循 [https://www.rfc-editor.org/rfc/rfc5321 RFC 5321: Simple Mail Transfer Protocol] 規格


=== 姓名欄位 ===
=== 姓名欄位 ===
Line 83: Line 88:
'''Hash Algorithm Output and Schema Reference'''
'''Hash Algorithm Output and Schema Reference'''
<ref>[https://en.wikipedia.org/wiki/Secure_Hash_Algorithms Secure Hash Algorithms - Wikipedia]</ref>
<ref>[https://en.wikipedia.org/wiki/Secure_Hash_Algorithms Secure Hash Algorithms - Wikipedia]</ref>
<table border="1" class="wikitable sortable">
 
       <tr>
<table border="1" class="wikitable sortable" style="border-collapse: collapse; width: 100%;">
           <th>Algorithm</th>
       <tr style="background-color: #f2f2f2;">
           <th>Output Size (bits)</th>
           <th style="text-align: left;">Algorithm</th>
           <th>Max Length (chars)</th>
           <th style="text-align: left;">Output Size (bits)</th>
           <th>Schema Recommendation</th>
           <th style="text-align: left;">Max Length (chars)</th>
           <th style="text-align: left;">Schema Recommendation (Text)</th>
          <th style="text-align: left;">Schema Recommendation (Binary)</th>
       </tr>
       </tr>
       <tr>
       <tr>
Line 95: Line 102:
           <td>32</td>
           <td>32</td>
           <td>char(32)</td>
           <td>char(32)</td>
          <td>binary(16)</td>
       </tr>
       </tr>
       <tr>
       <tr>
Line 101: Line 109:
           <td>40</td>
           <td>40</td>
           <td>char(40)</td>
           <td>char(40)</td>
          <td>binary(20)</td>
       </tr>
       </tr>
       <tr>
       <tr>
Line 107: Line 116:
           <td>56</td>
           <td>56</td>
           <td>char(56)</td>
           <td>char(56)</td>
          <td>binary(28)</td>
       </tr>
       </tr>
       <tr>
       <tr>
Line 113: Line 123:
           <td>64</td>
           <td>64</td>
           <td>char(64)</td>
           <td>char(64)</td>
          <td>binary(32)</td>
       </tr>
       </tr>
       <tr>
       <tr>
Line 119: Line 130:
           <td>96</td>
           <td>96</td>
           <td>char(96)</td>
           <td>char(96)</td>
          <td>binary(48)</td>
       </tr>
       </tr>
       <tr>
       <tr>
Line 125: Line 137:
           <td>128</td>
           <td>128</td>
           <td>char(128)</td>
           <td>char(128)</td>
          <td>binary(64)</td>
       </tr>
       </tr>
</table>
</table>


Explain the conversion process from 224 bits to 56 characters for SHA-224's output. Conversion process:
Explain the conversion process from 224 bits to 56 characters for SHA-224's output. Conversion process:
* "Original output: 224 bits"
* Original output: 224 bits
* Every 4 bits converts to 1 hexadecimal character (hex character): 224 ÷ 4 = 56
* '''Text Representation (Hexadecimal)''': Every 4 bits converts to 1 hexadecimal character (hex character): 224 ÷ 4 = 56 Therefore, it requires 56 hexadecimal characters to represent
* Therefore, it requires 56 hexadecimal characters to represent
* '''Binary Storage Representation''': Every 8 bits equals 1 byte in binary storage: 224 ÷ 8 = 28 Therefore, it requires 28 bytes (binary(28)) to store efficiently
 


[https://zh.wikipedia.org/wiki/MD5 MD5]: {{exclaim}} Not recommended to use this function to secure passwords
[https://zh.wikipedia.org/wiki/MD5 MD5]: {{exclaim}} Not recommended to use this function to secure passwords
Line 212: Line 224:


=== 台灣公司統一編號 ===
=== 台灣公司統一編號 ===
統一編號 (Unified Business Number, 簡稱 UBN)
* 數值長度:八位數字  
* 數值長度:八位數字  
* 建議資料類型:因為可能以 0 開頭,所以建議使用 {{kbd | key= CHAR(8)}},而不建議使用 {{kbd | key= INT(8)}} <ref>[https://www.etax.nat.gov.tw/etwmain/web/ETW113W1_1 公示資料查詢服務-財政部稅務入口網]</ref><ref>[http://herolin.webhop.me/entry/is-valid-TW-company-ID/ » 營利事業統一編號驗證完全手冊(Javascript,Java,C#,PHP) - Hero Think~用手摀住我的嘴]</ref> {{exclaim}} 早期公司統一編號不是八位數字
* 建議資料類型:因為可能以 0 開頭,所以建議使用 {{kbd | key= CHAR(8)}},而不建議使用 {{kbd | key= INT(8)}} <ref>[https://www.etax.nat.gov.tw/etwmain/web/ETW113W1_1 公示資料查詢服務-財政部稅務入口網]</ref><ref>[http://herolin.webhop.me/entry/is-valid-TW-company-ID/ » 營利事業統一編號驗證完全手冊(Javascript,Java,C#,PHP) - Hero Think~用手摀住我的嘴]</ref> {{exclaim}} 早期公司統一編號不是八位數字

Navigation menu