doc-exports/docs/dws/dev/dws_04_0995.html
Lu, Huayi e6fa411af0 DWS DEV 830.201 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2024-05-16 07:24:04 +00:00

116 lines
23 KiB
HTML

<a name="EN-US_TOPIC_0000001361615990"></a><a name="EN-US_TOPIC_0000001361615990"></a>
<h1 class="topictitle1">Using Functions for Encryption and Decryption</h1>
<div id="body0000001361615990"><p id="EN-US_TOPIC_0000001361615990__p148651329172812">GaussDB(DWS) supports encryption and decryption of strings using the following functions:</p>
<ul id="EN-US_TOPIC_0000001361615990__ul19444133823517"><li id="EN-US_TOPIC_0000001361615990__li244919312195">gs_encrypt(encryptstr, keystr, cryptotype, cryptomode, hashmethod)<p id="EN-US_TOPIC_0000001361615990__p1944912311919"><a name="EN-US_TOPIC_0000001361615990__li244919312195"></a><a name="li244919312195"></a>Description: Encrypts an <strong id="EN-US_TOPIC_0000001361615990__b1428913364386">encryptstr</strong> string using the <strong id="EN-US_TOPIC_0000001361615990__b629610362382">keystr</strong> key based on the encryption algorithm specified by <strong id="EN-US_TOPIC_0000001361615990__b1529613366387">cryptotype</strong> and <strong id="EN-US_TOPIC_0000001361615990__b2296536143819">cryptomode</strong> and the HMAC algorithm specified by <strong id="EN-US_TOPIC_0000001361615990__b5296436113814">hashmethod</strong>, and returns the encrypted string. <strong id="EN-US_TOPIC_0000001361615990__b16587173713817">cryptotype</strong> can be <strong id="EN-US_TOPIC_0000001361615990__b358733718387">aes128</strong>, <strong id="EN-US_TOPIC_0000001361615990__b6587437143815">aes192</strong>, <strong id="EN-US_TOPIC_0000001361615990__b1758817371381">aes256</strong>, or <strong id="EN-US_TOPIC_0000001361615990__b55881737143814">sm4</strong>. <strong id="EN-US_TOPIC_0000001361615990__b11723938143816">cryptomode</strong> is <strong id="EN-US_TOPIC_0000001361615990__b2072319388385">cbc</strong>. <strong id="EN-US_TOPIC_0000001361615990__b1165573983816">hashmethod</strong> can be <strong id="EN-US_TOPIC_0000001361615990__b7655173919384">sha256</strong>, <strong id="EN-US_TOPIC_0000001361615990__b5656143910384">sha384</strong>, <strong id="EN-US_TOPIC_0000001361615990__b196561239153811">sha512</strong>, or <strong id="EN-US_TOPIC_0000001361615990__b11656539133820">sm3</strong>. Currently, the following types of data can be encrypted: numerals supported in the database; character type; RAW in binary type; and DATE, TIMESTAMP, and SMALLDATETIME in date/time type. The <strong id="EN-US_TOPIC_0000001361615990__b275934110381">keystr</strong> length is related to the encryption algorithm and contains 1 to <strong id="EN-US_TOPIC_0000001361615990__b47602412388">KeyLen</strong> bytes. If <strong id="EN-US_TOPIC_0000001361615990__b1943554315383">cryptotype</strong> is <strong id="EN-US_TOPIC_0000001361615990__b164361437386">aes128</strong> or <strong id="EN-US_TOPIC_0000001361615990__b9436174333812">sm4</strong>, <strong id="EN-US_TOPIC_0000001361615990__b6436104311386">KeyLen</strong> is <strong id="EN-US_TOPIC_0000001361615990__b13436204319388">16</strong>; if <strong id="EN-US_TOPIC_0000001361615990__b17437194303812">cryptotype</strong> is <strong id="EN-US_TOPIC_0000001361615990__b11437104313810">aes192</strong>, <strong id="EN-US_TOPIC_0000001361615990__b1437143173818">KeyLen</strong> is <strong id="EN-US_TOPIC_0000001361615990__b84389435383">24</strong>; if <strong id="EN-US_TOPIC_0000001361615990__b043804313385">cryptotype</strong> is <strong id="EN-US_TOPIC_0000001361615990__b15438134393813">aes256</strong>, <strong id="EN-US_TOPIC_0000001361615990__b6439114343818">KeyLen</strong> is <strong id="EN-US_TOPIC_0000001361615990__b743914323814">32</strong>.</p>
<p id="EN-US_TOPIC_0000001361615990__p164491332199">Return type: text</p>
<p id="EN-US_TOPIC_0000001361615990__p16449173121914">Length of the return value: at least 4 x [(maclen + 56)/3] bytes and no more than 4 x [(Len + maclen + 56)/3] bytes, where <strong id="EN-US_TOPIC_0000001361615990__b696334423812">Len</strong> indicates the string length (in bytes) before the encryption and <strong id="EN-US_TOPIC_0000001361615990__b69649443386">maclen</strong> indicates the length of the HMAC value. If <strong id="EN-US_TOPIC_0000001361615990__b129641844123814">hashmethod</strong> is <strong id="EN-US_TOPIC_0000001361615990__b2096513445387">sha256</strong> or <strong id="EN-US_TOPIC_0000001361615990__b6965644113812">sm3</strong>, <strong id="EN-US_TOPIC_0000001361615990__b196510446381">maclen</strong> is <strong id="EN-US_TOPIC_0000001361615990__b8965134412386">32</strong>; if <strong id="EN-US_TOPIC_0000001361615990__b696613445383">hashmethod</strong> is <strong id="EN-US_TOPIC_0000001361615990__b696614403814">sha384</strong>, <strong id="EN-US_TOPIC_0000001361615990__b149661844183813">maclen</strong> is <strong id="EN-US_TOPIC_0000001361615990__b129675440389">48</strong>; if <strong id="EN-US_TOPIC_0000001361615990__b69671744173810">hashmethod</strong> is <strong id="EN-US_TOPIC_0000001361615990__b159671944143818">sha512</strong>, <strong id="EN-US_TOPIC_0000001361615990__b10968544103811">maclen</strong> is <strong id="EN-US_TOPIC_0000001361615990__b12968164453818">64</strong>. That is, if <strong id="EN-US_TOPIC_0000001361615990__b17291184811382">hashmethod</strong> is <strong id="EN-US_TOPIC_0000001361615990__b16291448183817">sha256</strong> or <strong id="EN-US_TOPIC_0000001361615990__b6292548173817">sm3</strong>, the returned string contains 120 to 4 x [(Len + 88)/3] bytes; if <strong id="EN-US_TOPIC_0000001361615990__b1229211482382">hashmethod</strong> is <strong id="EN-US_TOPIC_0000001361615990__b1929211487385">sha384</strong>, the returned string contains 140 to 4 x [(Len + 104)/3] bytes; if <strong id="EN-US_TOPIC_0000001361615990__b20293144823819">hashmethod</strong> is <strong id="EN-US_TOPIC_0000001361615990__b1529320480383">sha512</strong>, the returned string contains 160 to 4 x [(Len + 120)/3] bytes.</p>
<p id="EN-US_TOPIC_0000001361615990__p444910315194">Example:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001361615990__screen244912311197"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span>
<span class="normal">3</span>
<span class="normal">4</span>
<span class="normal">5</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">SELECT</span><span class="w"> </span><span class="n">gs_encrypt</span><span class="p">(</span><span class="s1">'GaussDB(DWS)'</span><span class="p">,</span><span class="w"> </span><span class="s1">'1234'</span><span class="p">,</span><span class="w"> </span><span class="s1">'aes128'</span><span class="p">,</span><span class="w"> </span><span class="s1">'cbc'</span><span class="p">,</span><span class="w"> </span><span class="s1">'sha256'</span><span class="p">);</span>
<span class="w"> </span><span class="n">gs_encrypt</span><span class="w"> </span>
<span class="c1">--------------------------------------------------------------------------------------------------------------------------</span>
<span class="w"> </span><span class="n">AAAAAAAAAACcFjDcCSbop7D87sOa2nxTFrkE9RJQGK34ypgrOPsFJIqggI8tl</span><span class="o">+</span><span class="n">eMDcQYT3po98wPCC7VBfhv7mdBy7IVnzdrp0rdMrD6</span><span class="o">/</span><span class="n">zTl8w0v9</span><span class="o">/</span><span class="n">s2OA</span><span class="o">==</span>
<span class="p">(</span><span class="mi">1</span><span class="w"> </span><span class="k">row</span><span class="p">)</span>
</pre></div></td></tr></table></div>
</div>
<div class="note" id="EN-US_TOPIC_0000001361615990__note1344973131915"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001361615990__ul1593565219442"><li id="EN-US_TOPIC_0000001361615990__li693575254420">A decryption password is required during the execution of this function. For security purposes, the gsql tool does not record this function in the execution history. That is, the execution history of this function cannot be found in <strong id="EN-US_TOPIC_0000001361615990__b83671155183812">gsql</strong> by paging up and down.</li><li id="EN-US_TOPIC_0000001361615990__li189351552104416">Do not use the <strong id="EN-US_TOPIC_0000001361615990__b163942569384">ge_encrypt</strong> and <strong id="EN-US_TOPIC_0000001361615990__b143947564387">gs_encrypt_aes128</strong> functions for the same data table.</li></ul>
</div></div>
</li><li id="EN-US_TOPIC_0000001361615990__li1552862115386">gs_decrypt(decryptstr, keystr,cryptotype, cryptomode, hashmethod)<p id="EN-US_TOPIC_0000001361615990__p78921348171812"><a name="EN-US_TOPIC_0000001361615990__li1552862115386"></a><a name="li1552862115386"></a>Description: Decrypts a <strong id="EN-US_TOPIC_0000001361615990__b102972058203818">decryptstr</strong> string using the <strong id="EN-US_TOPIC_0000001361615990__b3298155813810">keystr</strong> key based on the encryption algorithm specified by <strong id="EN-US_TOPIC_0000001361615990__b22984588380">cryptotype</strong> and <strong id="EN-US_TOPIC_0000001361615990__b122981958123811">cryptomode</strong> and the HMAC algorithm specified by <strong id="EN-US_TOPIC_0000001361615990__b829945813389">hashmethod</strong>, and returns the decrypted string. The <strong id="EN-US_TOPIC_0000001361615990__b43526023913">keystr</strong> used for decryption must be consistent with that used for encryption. <strong id="EN-US_TOPIC_0000001361615990__b9307818397">keystr</strong> cannot be empty.</p>
<p id="EN-US_TOPIC_0000001361615990__p1689344811812">Return type: text</p>
<p id="EN-US_TOPIC_0000001361615990__p19893648171820">Example:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001361615990__screen1889384814180"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span>
<span class="normal">3</span>
<span class="normal">4</span>
<span class="normal">5</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">SELECT</span><span class="w"> </span><span class="n">gs_decrypt</span><span class="p">(</span><span class="s1">'AAAAAAAAAACcFjDcCSbop7D87sOa2nxTFrkE9RJQGK34ypgrOPsFJIqggI8tl+eMDcQYT3po98wPCC7VBfhv7mdBy7IVnzdrp0rdMrD6/zTl8w0v9/s2OA=='</span><span class="p">,</span><span class="w"> </span><span class="s1">'1234'</span><span class="p">,</span><span class="w"> </span><span class="s1">'aes128'</span><span class="p">,</span><span class="w"> </span><span class="s1">'cbc'</span><span class="p">,</span><span class="w"> </span><span class="s1">'sha256'</span><span class="p">);</span>
<span class="w"> </span><span class="n">gs_decrypt</span><span class="w"> </span>
<span class="c1">--------------</span>
<span class="w"> </span><span class="n">GaussDB</span><span class="p">(</span><span class="n">DWS</span><span class="p">)</span>
<span class="p">(</span><span class="mi">1</span><span class="w"> </span><span class="k">row</span><span class="p">)</span>
</pre></div></td></tr></table></div>
</div>
<div class="note" id="EN-US_TOPIC_0000001361615990__note168931148111818"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001361615990__ul182621953154813"><li id="EN-US_TOPIC_0000001361615990__li16262145316484">A decryption password is required during the execution of this function. For security purposes, the gsql tool does not record this function in the execution history. That is, the execution history of this function cannot be found in <strong id="EN-US_TOPIC_0000001361615990__b17549156163917">gsql</strong> by paging up and down.</li><li id="EN-US_TOPIC_0000001361615990__li326220533482">This function works with the <strong id="EN-US_TOPIC_0000001361615990__b174971874398">gs_encrypt</strong> function, and the two functions must use the same encryption algorithm and HMAC algorithm.</li></ul>
</div></div>
</li><li id="EN-US_TOPIC_0000001361615990__lfca7dea5c82849adbfe41acf6f121bda">gs_encrypt_aes128(encryptstr,keystr)<p id="EN-US_TOPIC_0000001361615990__addf697453f6d4483932a86dd616d176f"><a name="EN-US_TOPIC_0000001361615990__lfca7dea5c82849adbfe41acf6f121bda"></a><a name="lfca7dea5c82849adbfe41acf6f121bda"></a>Description: Encrypts <strong id="EN-US_TOPIC_0000001361615990__b3392191013397">encryptstr</strong> strings using <strong id="EN-US_TOPIC_0000001361615990__b13393151018395">keystr</strong> as the key and returns encrypted strings. The length of <strong id="EN-US_TOPIC_0000001361615990__b3604191111393">keystr</strong> ranges from 1 to 16 bytes. Currently, the following types of data can be encrypted: numerals supported in the database; character type; RAW in binary type; and DATE, TIMESTAMP, and SMALLDATETIME in date/time type.</p>
<p id="EN-US_TOPIC_0000001361615990__a261cb21a20c64c27b6feee99dc2bd092">Return type: text</p>
<p id="EN-US_TOPIC_0000001361615990__p165132855810">Length of the return value: At least 92 bytes and no more than (4*[<em id="EN-US_TOPIC_0000001361615990__i10634814163919">Len</em>/3]+68) bytes, where <em id="EN-US_TOPIC_0000001361615990__i10634614143916">Len</em> indicates the length of the data before encryption (unit: byte).</p>
<p id="EN-US_TOPIC_0000001361615990__ad5c69250d3874381b8fc46537ee3c4c4">Example:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001361615990__s773caa26d00244aaadbe112a57a07c2a"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span>
<span class="normal">3</span>
<span class="normal">4</span>
<span class="normal">5</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">SELECT</span><span class="w"> </span><span class="n">gs_encrypt_aes128</span><span class="p">(</span><span class="s1">'DWS'</span><span class="p">,</span><span class="s1">'1234'</span><span class="p">);</span>
<span class="w"> </span><span class="n">gs_encrypt_aes128</span>
<span class="c1">----------------------------------------------------------------------------------------------</span>
<span class="w"> </span><span class="n">MGFX</span><span class="o">/</span><span class="n">AvA69PvS6wgZMtEAwNdjf</span><span class="o">/</span><span class="n">lMM6b7pIY5miAAkS0cf3m5mKl8iNe1BKDVqTvgZEEoMTycVVE</span><span class="o">+</span><span class="n">tHF69uHYznXyhs</span><span class="o">=</span>
<span class="p">(</span><span class="mi">1</span><span class="w"> </span><span class="k">row</span><span class="p">)</span>
</pre></div></td></tr></table></div>
</div>
<div class="note" id="EN-US_TOPIC_0000001361615990__note215923432512"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001361615990__ul0601044164913"><li id="EN-US_TOPIC_0000001361615990__li860134417495">A decryption password is required during the execution of this function. For security purposes, the gsql tool does not record this function in the execution history. That is, the execution history of this function cannot be found in <strong id="EN-US_TOPIC_0000001361615990__b385132223914">gsql</strong> by paging up and down.</li><li id="EN-US_TOPIC_0000001361615990__li35260210501">Do not use the <strong id="EN-US_TOPIC_0000001361615990__b82854202392">ge_encrypt</strong> and <strong id="EN-US_TOPIC_0000001361615990__b15292142073910">gs_encrypt_aes128</strong> functions for the same data table.</li></ul>
</div></div>
</li><li id="EN-US_TOPIC_0000001361615990__l86debe14b77545dabb00f3981aee68f7">gs_decrypt_aes128(decryptstr,keystr)<p id="EN-US_TOPIC_0000001361615990__a92ba9204566a43caa344f9ce83d855b3"><a name="EN-US_TOPIC_0000001361615990__l86debe14b77545dabb00f3981aee68f7"></a><a name="l86debe14b77545dabb00f3981aee68f7"></a>Description: Decrypts a <strong id="EN-US_TOPIC_0000001361615990__b03009240394">decryptstr</strong> string using the <strong id="EN-US_TOPIC_0000001361615990__b12301122413397">keystr</strong> key and returns the decrypted string. The <strong id="EN-US_TOPIC_0000001361615990__b18623102617399">keystr</strong> used for decryption must be consistent with that used for encryption. <strong id="EN-US_TOPIC_0000001361615990__b343842510391">keystr</strong> cannot be empty.</p>
<p id="EN-US_TOPIC_0000001361615990__aed6a2dcba6ff4362881176ebb87178d2">Return type: text</p>
<p id="EN-US_TOPIC_0000001361615990__a076237f476664575934af056d8ec08e6">Example:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001361615990__s6e827374dd8d4fec8502601f98c2a392"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span>
<span class="normal">3</span>
<span class="normal">4</span>
<span class="normal">5</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">SELECT</span><span class="w"> </span><span class="n">gs_decrypt_aes128</span><span class="p">(</span><span class="s1">'MGFX/AvA69PvS6wgZMtEAwNdjf/lMM6b7pIY5miAAkS0cf3m5mKl8iNe1BKDVqTvgZEEoMTycVVE+tHF69uHYznXyhs='</span><span class="p">,</span><span class="s1">'1234'</span><span class="p">);</span>
<span class="w"> </span><span class="n">gs_decrypt_aes128</span>
<span class="c1">-------------------</span>
<span class="w"> </span><span class="n">DWS</span>
<span class="p">(</span><span class="mi">1</span><span class="w"> </span><span class="k">row</span><span class="p">)</span>
</pre></div></td></tr></table></div>
</div>
<div class="note" id="EN-US_TOPIC_0000001361615990__note1688334020262"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001361615990__ul20891555320"><li id="EN-US_TOPIC_0000001361615990__li189135205317">A decryption password is required during the execution of this function. For security purposes, the gsql tool does not record this function in the execution history. That is, the execution history of this function cannot be found in <strong id="EN-US_TOPIC_0000001361615990__b818663453916">gsql</strong> by paging up and down.</li><li id="EN-US_TOPIC_0000001361615990__li20895545312">This function works with the <strong id="EN-US_TOPIC_0000001361615990__b1482823613394">gs_encrypt_aes128</strong> function.</li></ul>
</div></div>
</li><li id="EN-US_TOPIC_0000001361615990__li164891932102916">gs_hash(hashstr, hashmethod)<p id="EN-US_TOPIC_0000001361615990__p34111329153015"><a name="EN-US_TOPIC_0000001361615990__li164891932102916"></a><a name="li164891932102916"></a>Description: Obtains the digest string of a <strong id="EN-US_TOPIC_0000001361615990__b36418384394">hashstr</strong> string based on the algorithm specified by <strong id="EN-US_TOPIC_0000001361615990__b18642113843915">hashmethod</strong>. <strong id="EN-US_TOPIC_0000001361615990__b67141039193914">hashmethod</strong> can be <strong id="EN-US_TOPIC_0000001361615990__b1271433910390">sha256</strong>, <strong id="EN-US_TOPIC_0000001361615990__b3714163912391">sha384</strong>, <strong id="EN-US_TOPIC_0000001361615990__b16715183953913">sha512</strong>, or <strong id="EN-US_TOPIC_0000001361615990__b18715113973913">sm3</strong>.</p>
<p id="EN-US_TOPIC_0000001361615990__p4489193213292">Return type: text</p>
<p id="EN-US_TOPIC_0000001361615990__p8950122213456">Length of the return value: 64 bytes if <strong id="EN-US_TOPIC_0000001361615990__b176791844113911">hashmethod</strong> is <strong id="EN-US_TOPIC_0000001361615990__b96861644133917">sha256</strong> or <strong id="EN-US_TOPIC_0000001361615990__b196861444153916">sm3</strong>; 96 bytes if <strong id="EN-US_TOPIC_0000001361615990__b1768644419395">hashmethod</strong> is <strong id="EN-US_TOPIC_0000001361615990__b3687104415399">sha384</strong>; 128 bytes if <strong id="EN-US_TOPIC_0000001361615990__b136871344173913">hashmethod</strong> is <strong id="EN-US_TOPIC_0000001361615990__b8688124413394">sha512</strong></p>
<p id="EN-US_TOPIC_0000001361615990__p144891328291">Example:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001361615990__screen6489163218298"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span>
<span class="normal">3</span>
<span class="normal">4</span>
<span class="normal">5</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">SELECT</span><span class="w"> </span><span class="n">gs_hash</span><span class="p">(</span><span class="s1">'GaussDB(DWS)'</span><span class="p">,</span><span class="w"> </span><span class="s1">'sha256'</span><span class="p">);</span>
<span class="w"> </span><span class="n">gs_hash</span><span class="w"> </span>
<span class="c1">--------------------------------------------------------------------------------------------------</span>
<span class="w"> </span><span class="n">e59069daa6541ae20af7c747662702c731b26b8abd7a788f4d15611aa0db608efdbb5587ba90789a983f85dd51766609</span>
<span class="p">(</span><span class="mi">1</span><span class="w"> </span><span class="k">row</span><span class="p">)</span>
</pre></div></td></tr></table></div>
</div>
</li><li id="EN-US_TOPIC_0000001361615990__li392120539468">md5(string)<p id="EN-US_TOPIC_0000001361615990__p5407244519"><a name="EN-US_TOPIC_0000001361615990__li392120539468"></a><a name="li392120539468"></a>Description: Encrypts a string in MD5 mode and returns a value in hexadecimal form.</p>
<div class="note" id="EN-US_TOPIC_0000001361615990__note18404294512"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001361615990__p194111294518">MD5 is insecure and is not recommended.</p>
</div></div>
<p id="EN-US_TOPIC_0000001361615990__p184115210454">Return type: text</p>
<p id="EN-US_TOPIC_0000001361615990__p19413244510">Example:</p>
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001361615990__screen3415214515"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</span>
<span class="normal">3</span>
<span class="normal">4</span>
<span class="normal">5</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">SELECT</span><span class="w"> </span><span class="n">md5</span><span class="p">(</span><span class="s1">'ABC'</span><span class="p">);</span>
<span class="w"> </span><span class="n">md5</span><span class="w"> </span>
<span class="c1">----------------------------------</span>
<span class="w"> </span><span class="mi">902</span><span class="n">fbdd2b1df0c4f70b4a5d23525e932</span>
<span class="p">(</span><span class="mi">1</span><span class="w"> </span><span class="k">row</span><span class="p">)</span>
</pre></div></td></tr></table></div>
</div>
</li></ul>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_04_0994.html">Sensitive Data Management</a></div>
</div>
</div>