<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>MSSQL User Defined Functions and APIs on</title><link>https://docs.protegrity.com/protectors/10.0/docs/database_protector/dbp_api_udfs/mssql_api_udfs/</link><description>Recent content in MSSQL User Defined Functions and APIs on</description><generator>Hugo</generator><language>en</language><atom:link href="https://docs.protegrity.com/protectors/10.0/docs/database_protector/dbp_api_udfs/mssql_api_udfs/index.xml" rel="self" type="application/rss+xml"/><item><title>General Functions</title><link>https://docs.protegrity.com/protectors/10.0/docs/database_protector/dbp_api_udfs/mssql_api_udfs/dbp_mssql_gen_func/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.protegrity.com/protectors/10.0/docs/database_protector/dbp_api_udfs/mssql_api_udfs/dbp_mssql_gen_func/</guid><description>&lt;h2 id="pty_getversion">pty_getVersion&lt;/h2>
&lt;p>This function returns the version of the installed protector.&lt;/p>
&lt;p>&lt;strong>Signature:&lt;/strong> &lt;br>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>pty_getVersion()
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Parameters:&lt;/strong> &lt;br>
None&lt;/p>
&lt;p>&lt;strong>Returns:&lt;/strong> &lt;br>
This UDF returns the version number as the NVARCHAR datatype.&lt;/p>
&lt;p>&lt;strong>Example:&lt;/strong> &lt;br>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>DECLARE
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>@data NVARCHAR(64)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>SELECT @data = &amp;lt;database_name&amp;gt;.dbo.pty_getVersion()
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>PRINT @data;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="pty_whoami">pty_whoAmI&lt;/h2>
&lt;p>This function returns the name of the logged in user.&lt;/p>
&lt;p>&lt;strong>Signature:&lt;/strong> &lt;br>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>pty_whoAmI()
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Parameters:&lt;/strong> &lt;br>
None&lt;/p>
&lt;p>&lt;strong>Returns:&lt;/strong> &lt;br>
This UDF returns the name of the user as the NVARCHAR datatype.&lt;/p>
&lt;p>&lt;strong>Example:&lt;/strong> &lt;br>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>DECLARE
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>@data NVARCHAR
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>SELECT @data = &amp;lt;database_name&amp;gt;.dbo.pty_whoAmI()
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>PRINT @data
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Insert Procedures</title><link>https://docs.protegrity.com/protectors/10.0/docs/database_protector/dbp_api_udfs/mssql_api_udfs/dbp_mssql_ins_prc/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.protegrity.com/protectors/10.0/docs/database_protector/dbp_api_udfs/mssql_api_udfs/dbp_mssql_ins_prc/</guid><description>&lt;p>These extended procedures are used while protecting data using Insert queries.&lt;/p>
&lt;h2 id="xp_pty_insert">xp_pty_insert&lt;/h2>
&lt;p>This stored procedure protects the data using an encryption data element.&lt;/p>
&lt;p>&lt;strong>Signature:&lt;/strong> &lt;br>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>xp_pty_insert(outputdata VARBINARY OUTPUT, data VARCHAR,dataelement VARCHAR, scid INT)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Parameters:&lt;/strong> &lt;br>&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>&lt;strong>Name&lt;/strong>&lt;/th>
 &lt;th>&lt;strong>Type&lt;/strong>&lt;/th>
 &lt;th>&lt;strong>Description&lt;/strong>&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>outputdata&lt;/td>
 &lt;td>VARBINARY(8000)&lt;/td>
 &lt;td>Specifies the result of the protect operation.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>data&lt;/td>
 &lt;td>VARCHAR(8000)&lt;/td>
 &lt;td>Specifies the data to protect.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>dataelement&lt;/td>
 &lt;td>VARCHAR(64)&lt;/td>
 &lt;td>Specifies the name of the data element.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>scid&lt;/td>
 &lt;td>INT&lt;/td>
 &lt;td>Specifies the security coordinate ID. Set the value of the parameter to zero. &lt;br> &lt;strong>Note:&lt;/strong> &lt;br> This parameter is no longer used and is retained for compatibility purposes only.&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>&lt;strong>Returns:&lt;/strong> &lt;br>
This UDF returns either of the following values as protected data in the output parameter&lt;/p></description></item><item><title>UPDATE Extended Stored Procedures</title><link>https://docs.protegrity.com/protectors/10.0/docs/database_protector/dbp_api_udfs/mssql_api_udfs/dbp_mssql_upd_ext_strd_prc/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.protegrity.com/protectors/10.0/docs/database_protector/dbp_api_udfs/mssql_api_udfs/dbp_mssql_upd_ext_strd_prc/</guid><description>&lt;p>These stored procedures are used while protecting data using Update statements.&lt;/p>
&lt;h2 id="xp_pty_update">xp_pty_update&lt;/h2>
&lt;p>This stored procedure protects the data using an encryption data element.&lt;/p>
&lt;p>&lt;strong>Signature:&lt;/strong> &lt;br>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>xp_pty_update(outputdata VARBINARY OUTPUT, data VARCHAR, dataelement VARCHAR, status CHAR, scid INT)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Parameters:&lt;/strong> &lt;br>&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>&lt;strong>Name&lt;/strong>&lt;/th>
 &lt;th>&lt;strong>Type&lt;/strong>&lt;/th>
 &lt;th>&lt;strong>Description&lt;/strong>&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>outputdata&lt;/td>
 &lt;td>VARBINARY(8000)&lt;/td>
 &lt;td>Specifies the result of the protect operation.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>data&lt;/td>
 &lt;td>VARCHAR(8000)&lt;/td>
 &lt;td>Specifies the data to protect.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>dataelement&lt;/td>
 &lt;td>VARCHAR(64)&lt;/td>
 &lt;td>Specifies the name of the data element.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>status&lt;/td>
 &lt;td>CHAR(1)&lt;/td>
 &lt;td>Specifies the status value set to &amp;lsquo;T&amp;rsquo;.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>scid&lt;/td>
 &lt;td>INT&lt;/td>
 &lt;td>Specifies the security coordinate ID. Set the value of the parameter to zero. &lt;br> &lt;strong>Note:&lt;/strong> &lt;br> This parameter is no longer used and is retained for compatibility purposes only.&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>&lt;strong>Returns:&lt;/strong> &lt;br>
This UDF returns either of the following values as protected data in the output parameter:&lt;/p></description></item><item><title>Access Check Procedures</title><link>https://docs.protegrity.com/protectors/10.0/docs/database_protector/dbp_api_udfs/mssql_api_udfs/dbp_mssql_acc_chk_prc/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.protegrity.com/protectors/10.0/docs/database_protector/dbp_api_udfs/mssql_api_udfs/dbp_mssql_acc_chk_prc/</guid><description>&lt;p>These functions check access permissions allowed to the user for protecting or unprotecting the data. Depending on the permitted access, a bit value 0 (zero) or 1 is returned.&lt;/p>
&lt;h2 id="xp_pty_select_check">xp_pty_select_check&lt;/h2>
&lt;p>This stored procedure determines whether the user has select (unprotect) access to the data element.&lt;/p>
&lt;p>&lt;strong>Signature:&lt;/strong> &lt;br>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>xp_pty_select_check(dataelement VARCHAR)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Parameters:&lt;/strong> &lt;br>&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>&lt;strong>Name&lt;/strong>&lt;/th>
 &lt;th>&lt;strong>Type&lt;/strong>&lt;/th>
 &lt;th>&lt;strong>Description&lt;/strong>&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>dataelement&lt;/td>
 &lt;td>VARCHAR(64)&lt;/td>
 &lt;td>Specifies the name of the data element.&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>&lt;strong>Returns:&lt;/strong> &lt;br>
This UDF returns either of the following values:&lt;/p></description></item><item><title>Select Functions and Procedures</title><link>https://docs.protegrity.com/protectors/10.0/docs/database_protector/dbp_api_udfs/mssql_api_udfs/dbp_mssql_sel_func_prc/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.protegrity.com/protectors/10.0/docs/database_protector/dbp_api_udfs/mssql_api_udfs/dbp_mssql_sel_func_prc/</guid><description>&lt;p>These functions and stored procedures unprotect the data and return the unprotected value.&lt;/p>
&lt;h2 id="pty_select">pty_select&lt;/h2>
&lt;p>This function unprotects the data that is protected by an encryption data element.&lt;/p>
&lt;p>&lt;strong>Signature:&lt;/strong> &lt;br>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>pty_select (data VARBINARY, dataelement VARCHAR, def VARCHAR, scid INT)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Parameters:&lt;/strong> &lt;br>&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>&lt;strong>Name&lt;/strong>&lt;/th>
 &lt;th>&lt;strong>Type&lt;/strong>&lt;/th>
 &lt;th>&lt;strong>Description&lt;/strong>&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>data&lt;/td>
 &lt;td>VARBINARY(8000)&lt;/td>
 &lt;td>Specifies the data to unprotect.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>dataelement&lt;/td>
 &lt;td>VARCHAR(64)&lt;/td>
 &lt;td>Specifies the name of the the data element.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>def&lt;/td>
 &lt;td>VARCHAR(8000)&lt;/td>
 &lt;td>Specifies the default value that is returned if user does not have the permission to unprotect.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>scid&lt;/td>
 &lt;td>INT&lt;/td>
 &lt;td>Specifies the security coordinate ID. Set the value of the parameter to zero. &lt;br> &lt;strong>Note:&lt;/strong> &lt;br> This parameter is no longer used and is retained for compatibility purposes only.&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>&lt;strong>Returns:&lt;/strong> &lt;br>
This UDF returns the unprotected value as the VARCHAR(8000) datatype.&lt;/p></description></item><item><title>VARCHAR UDFs</title><link>https://docs.protegrity.com/protectors/10.0/docs/database_protector/dbp_api_udfs/mssql_api_udfs/dbp_mssql_varchar_udf/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.protegrity.com/protectors/10.0/docs/database_protector/dbp_api_udfs/mssql_api_udfs/dbp_mssql_varchar_udf/</guid><description>&lt;p>This section provides a list of VARCHAR UDFs for both, protect and unprotect operations.&lt;/p>
&lt;h2 id="pty_varcharins">pty_varcharins&lt;/h2>
&lt;p>This UDF protects the VARCHAR data through Tokenization or the No Encryption method.&lt;/p>
&lt;p>&lt;strong>Signature:&lt;/strong> &lt;br>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-gdscript3" data-lang="gdscript3">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">pty_varcharins&lt;/span>&lt;span style="color:#000;font-weight:bold">(&lt;/span>&lt;span style="color:#000">data&lt;/span> &lt;span style="color:#000">VARCHAR&lt;/span>&lt;span style="color:#000;font-weight:bold">(&lt;/span>&lt;span style="color:#0000cf;font-weight:bold">8000&lt;/span>&lt;span style="color:#000;font-weight:bold">),&lt;/span> &lt;span style="color:#000">dataelement&lt;/span> &lt;span style="color:#000">VARCHAR&lt;/span>&lt;span style="color:#000;font-weight:bold">(&lt;/span>&lt;span style="color:#0000cf;font-weight:bold">64&lt;/span>&lt;span style="color:#000;font-weight:bold">))&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Parameters:&lt;/strong> &lt;br>&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>&lt;strong>Name&lt;/strong>&lt;/th>
 &lt;th>&lt;strong>Type&lt;/strong>&lt;/th>
 &lt;th>&lt;strong>Description&lt;/strong>&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>data&lt;/td>
 &lt;td>VARCHAR(8000)&lt;/td>
 &lt;td>Specifies the data to protect.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>dataelement&lt;/td>
 &lt;td>VARCHAR(64)&lt;/td>
 &lt;td>Specifies the name of the data element.&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>&lt;strong>Results:&lt;/strong> &lt;br>
This UDF returns the protected value as the VARCHAR(8000) datatype.&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>Attention:&lt;/strong> If the user does not have access to the data in the policy, this UDF returns &amp;lsquo;NULL&amp;rsquo;.&lt;/p></description></item><item><title>NVARCHAR UDFs</title><link>https://docs.protegrity.com/protectors/10.0/docs/database_protector/dbp_api_udfs/mssql_api_udfs/dbp_mssql_nvarchar_udf/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.protegrity.com/protectors/10.0/docs/database_protector/dbp_api_udfs/mssql_api_udfs/dbp_mssql_nvarchar_udf/</guid><description>&lt;p>This section provides a list of NVARCHAR UDFs for both, protect and unprotect operations.&lt;/p>
&lt;h2 id="pty_unicodevarcharins">pty_unicodevarcharins&lt;/h2>
&lt;p>This UDF protects the NVARCHAR data using the Unicode Gen2, and FPE data elements.&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>Note:&lt;/strong> This UDF does not support masking.&lt;/p>&lt;/blockquote>
&lt;p>&lt;strong>Signature:&lt;/strong> &lt;br>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-gdscript3" data-lang="gdscript3">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">pty_unicodevarcharins&lt;/span>&lt;span style="color:#000;font-weight:bold">(&lt;/span>&lt;span style="color:#000">data&lt;/span> &lt;span style="color:#000">NVARCHAR&lt;/span>&lt;span style="color:#000;font-weight:bold">(&lt;/span>&lt;span style="color:#0000cf;font-weight:bold">4000&lt;/span>&lt;span style="color:#000;font-weight:bold">),&lt;/span> &lt;span style="color:#000">dataelement&lt;/span> &lt;span style="color:#000">VARCHAR&lt;/span>&lt;span style="color:#000;font-weight:bold">(&lt;/span>&lt;span style="color:#0000cf;font-weight:bold">64&lt;/span>&lt;span style="color:#000;font-weight:bold">))&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Parameters:&lt;/strong> &lt;br>&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>&lt;strong>Name&lt;/strong>&lt;/th>
 &lt;th>&lt;strong>Type&lt;/strong>&lt;/th>
 &lt;th>&lt;strong>Description&lt;/strong>&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>data&lt;/td>
 &lt;td>NVARCHAR(4000)&lt;/td>
 &lt;td>Specifies the data to protect.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>dataelement&lt;/td>
 &lt;td>VARCHAR(64)&lt;/td>
 &lt;td>Specifies the name of the data element.&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>&lt;strong>Returns:&lt;/strong> &lt;br>
This UDF returns the protected value as the NVARCHAR(4000) datatype.&lt;/p></description></item><item><title>Integer UDFs</title><link>https://docs.protegrity.com/protectors/10.0/docs/database_protector/dbp_api_udfs/mssql_api_udfs/dbp_mssql_int_udf/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.protegrity.com/protectors/10.0/docs/database_protector/dbp_api_udfs/mssql_api_udfs/dbp_mssql_int_udf/</guid><description>&lt;p>This section provides a list of Integer UDFs for both, protect and unprotect operations.&lt;/p>
&lt;h2 id="pty_integerins">pty_integerins&lt;/h2>
&lt;p>This UDF protects the Integer data through the tokenization method.&lt;/p>
&lt;p>&lt;strong>Signature:&lt;/strong> &lt;br>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>pty_integerins(data Integer, dataelement VARCHAR(64))
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Parameters:&lt;/strong> &lt;br>&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>&lt;strong>Name&lt;/strong>&lt;/th>
 &lt;th>&lt;strong>Type&lt;/strong>&lt;/th>
 &lt;th>&lt;strong>Description&lt;/strong>&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>data&lt;/td>
 &lt;td>Integer&lt;/td>
 &lt;td>Specifies the data to protect.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>dataelement&lt;/td>
 &lt;td>VARCHAR(64)&lt;/td>
 &lt;td>Specifies the name of the data element.&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>&lt;strong>Returns:&lt;/strong> &lt;br>
This UDF returns the protected value as the Integer datatype.&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>Attention:&lt;/strong> If the user does not have access to the data in the policy, this UDF returns &amp;lsquo;NULL&amp;rsquo;.&lt;/p></description></item><item><title>BLOB UDFs</title><link>https://docs.protegrity.com/protectors/10.0/docs/database_protector/dbp_api_udfs/mssql_api_udfs/dbp_mssql_blob_udf/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.protegrity.com/protectors/10.0/docs/database_protector/dbp_api_udfs/mssql_api_udfs/dbp_mssql_blob_udf/</guid><description>&lt;p>This section provides a list of UDFs that can be used for both, encryption and decryption of the data stored as BLOB.&lt;/p>
&lt;h2 id="pty_blobenc">pty_blobenc&lt;/h2>
&lt;p>This function encrypts the data stored as VARBINARY(max) using any encryption data element.&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>Warning:&lt;/strong> This function supports encryption of data up to 1GB. However, exceeding this limit will result in memory issues.&lt;/p>&lt;/blockquote>
&lt;p>&lt;strong>Signature:&lt;/strong> &lt;br>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>pty_blobenc(data VARBINARY(max), dataelement VARCHAR(64))
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Parameters:&lt;/strong> &lt;br>&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>&lt;strong>Name&lt;/strong>&lt;/th>
 &lt;th>&lt;strong>Type&lt;/strong>&lt;/th>
 &lt;th>&lt;strong>Description&lt;/strong>&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>data&lt;/td>
 &lt;td>VARBINARY (max*)&lt;/td>
 &lt;td>Specifies the data to protect.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>dataelement&lt;/td>
 &lt;td>VARCHAR(64)&lt;/td>
 &lt;td>Specifies the name of the data element.&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>&lt;strong>Returns:&lt;/strong> &lt;br>
This UDF returns the encrypted value as the VARBINARY (max*) datatype.&lt;/p></description></item><item><title>CLOB UDFs</title><link>https://docs.protegrity.com/protectors/10.0/docs/database_protector/dbp_api_udfs/mssql_api_udfs/dbp_mssql_clob_udf/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.protegrity.com/protectors/10.0/docs/database_protector/dbp_api_udfs/mssql_api_udfs/dbp_mssql_clob_udf/</guid><description>&lt;p>This section provides a list of UDFs that can be used for both, encryption and decryption of the data stored in CLOB.&lt;/p>
&lt;h2 id="pty_clobenc">pty_clobenc&lt;/h2>
&lt;p>This function encrypts the data stored as VARCHAR(max*) using any encryption data element.&lt;/p>
&lt;blockquote>
&lt;p>&lt;strong>Warning:&lt;/strong> This function supports encryption of data up to 1GB. However, exceeding this limit will result in memory issues.&lt;/p>&lt;/blockquote>
&lt;p>&lt;strong>Signature:&lt;/strong> &lt;br>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>pty_clobenc(data VARCHAR(max), dataelement VARCHAR(64))
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Parameters:&lt;/strong> &lt;br>&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>&lt;strong>Name&lt;/strong>&lt;/th>
 &lt;th>&lt;strong>Type&lt;/strong>&lt;/th>
 &lt;th>&lt;strong>Description&lt;/strong>&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>data&lt;/td>
 &lt;td>VARCHAR(max*)&lt;/td>
 &lt;td>Specifies the data to protect.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>dataelement&lt;/td>
 &lt;td>VARCHAR(64)&lt;/td>
 &lt;td>Specifies the name of the data element.&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>&lt;strong>Returns:&lt;/strong> &lt;br>
This UDF returns the encrypted value as the VARBINARY (max*) datatype.&lt;/p></description></item></channel></rss>