[#txindex-02-CreateKeyPrefix]
= xref:txindex-02.adoc[txindex]::CreateKeyPrefix
:relfileprefix: ../
:mrdocs:

Compute the txid&hyphen;hash key prefix for a transaction&period;

== Synopsis

Declared in `&lt;index&sol;txindex&lowbar;key&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:txindex-02/TxHashKeyPrefix.adoc[TxHashKeyPrefix]
CreateKeyPrefix(
    xref:SipHasher13UJ.adoc[SipHasher13UJ] const& hasher,
    xref:Txid.adoc[Txid] const& txid);
----

== Return Value

The truncated hash prefix used in the hashed txindex key&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *hasher*
| Salted SipHash used to hash the txid&period;
| *txid*
| Transaction id to hash&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
