.. index:: single: ksuid(Representation,Alphabet)
.. _ksuid/2:

.. rst-class:: right

**object**

``ksuid(Representation,Alphabet)``
==================================

* ``Representation`` - Text representation for the KSUID. Possible values are ``atom``, ``chars``, and ``codes``.
* ``Alphabet`` - Base62 alphabet used for encoding KSUIDs represented as an atom, list of characters, or list of character codes.


KSUID generator.

| **Availability:** 
|    ``logtalk_load(ksuid(loader))``

| **Author:** Paulo Moura
| **Version:** 1:0:0
| **Date:** 2026-02-26

| **Compilation flags:**
|    ``static, context_switching_calls``


| **Implements:**
|    ``public`` :ref:`ksuid_protocol <ksuid_protocol/0>`
| **Uses:**
|    :ref:`fast_random(Algorithm) <fast_random/1>`
|    :ref:`iso8601 <iso8601/0>`
|    :ref:`list <list/0>`
|    :ref:`os <os/0>`

| **Remarks:**
|    (none)

| **Inherited public predicates:**
|     :ref:`ksuid_protocol/0::generate/1`  

.. contents::
   :local:
   :backlinks: top

Public predicates
-----------------

(no local declarations; see entity ancestors if any)

Protected predicates
--------------------

(no local declarations; see entity ancestors if any)

Private predicates
------------------

(no local declarations; see entity ancestors if any)

Operators
---------

(none)

.. seealso::

   :ref:`ksuid <ksuid/0>`, :ref:`cuid2(Representation,Size,Alphabet) <cuid2/3>`, :ref:`nanoid(Representation,Size,Alphabet) <nanoid/3>`, :ref:`ids(Representation,Bytes) <ids/2>`, :ref:`ulid(Representation) <ulid/1>`, :ref:`snowflakeid(Representation,EpochMilliseconds,TimeUnitMilliseconds,TimestampBits,NodeBits,SequenceBits,Node) <snowflakeid/7>`, :ref:`uuid(Representation) <uuid/1>`

