> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# User/Security Functions

<a id="sql-functions-security" />

<AccordionGroup>
  <Accordion title="CURRENT_SCHEMA()" id="current_schema" defaultOpen>
    Returns the default schema of the current user
  </Accordion>

  <Accordion title="CURRENT_USER()" id="current_user" defaultOpen>
    Alias for `USER`
  </Accordion>

  <Accordion title="HASH(column[, seed])" id="hash-column-seed" defaultOpen>
    Returns a non-negative integer representing an obfuscated version
    of `column`, using the given `seed`; default `seed` is `0`
  </Accordion>

  <Accordion title="IS_MEMBER(role[, user/role])" id="is_member-role-user/role" defaultOpen>
    Returns whether the current user (or the given `user/role`,
    if specified) has been assigned the given `role`, either
    directly or indirectly:

    <div>
      <table class="table w-full [&_td]:min-w-[150px] [&_th]:text-left [&_td[data-numeric]]:tabular-nums">
        <thead>
          <tr>
            <th>Situation</th>
            <th>Result</th>
          </tr>
        </thead>

        <tbody>
          <tr>
            <td>Current user (or given <code>user/role</code>) has been granted <code>role</code></td>
            <td><code>true</code></td>
          </tr>

          <tr>
            <td>Current user (or given <code>user/role</code>) has not been granted <code>role</code></td>
            <td><code>false</code></td>
          </tr>

          <tr>
            <td>Role <code>role</code> does not exist</td>
            <td>*null*</td>
          </tr>
        </tbody>
      </table>
    </div>
  </Accordion>

  <Accordion title="IS_ROLEMEMBER(role[, user/role])" id="is_rolemember-role-user/role" defaultOpen>
    Alias for `IS_MEMBER`
  </Accordion>

  <Accordion title="MASK(expr, start, length[, char])" id="mask-expr-start-length-char" defaultOpen>
    Masks `length` bytes of `expr`, beginning at the byte position
    identified by `start`, with `*` characters (or the single-byte
    character specified in `char`):

    <Warning>
      The use of multi-byte characters in this function may
      have unexpected results.
    </Warning>

    <div>
      <table class="table w-full [&_td]:min-w-[150px] [&_th]:text-left [&_td[data-numeric]]:tabular-nums">
        <thead>
          <tr>
            <th>Function Call</th>
            <th>Result</th>
          </tr>
        </thead>

        <tbody>
          <tr>
            <td><code>MASK('Characters', 4, 5)</code></td>
            <td><code>Cha\*\*\*\*\*rs</code></td>
          </tr>

          <tr>
            <td><code>MASK('Characters', 5, 2, '#')</code></td>
            <td><code>Char##ters</code></td>
          </tr>
        </tbody>
      </table>
    </div>
  </Accordion>

  <Accordion title="NEW_UUID()" id="new_uuid" defaultOpen>
    Returns a randomly-generated UUID
  </Accordion>

  <Accordion title="OBFUSCATE(column[, seed])" id="obfuscate-column-seed" defaultOpen>
    Alias for `HASH`
  </Accordion>

  <Accordion title="SHA256(expr)" id="sha256-expr" defaultOpen>
    Returns the hex digits of the SHA-256 hash of the given value
    `expr` as a `char64` string.
  </Accordion>

  <Accordion title="SYSTEM_USER()" id="system_user" defaultOpen>
    Alias for `USER`
  </Accordion>

  <Accordion title="USER()" id="user" defaultOpen>
    Returns the username of the current user
  </Accordion>
</AccordionGroup>
