Shabal256 code explanation Can anyone please explain the code below with comments?

What are pbegin &amp; pend ?

What is ( I believe it is data, where it comes from ?): (pbegin == pend ? pblank : static_cast&lt;const void*&gt;(&amp;pbegin[0]))

What is (I believe it is the size of data 80?) : (pend - pbegin) * sizeof(pbegin[0])

What is : pblank[1]

template&lt;typename T1&gt;
inline uint256 HashShabal(const T1 pbegin, const T1 pend)
{    
    sph_shabal256_context ctx_shabal;
    static unsigned char pblank[1];
    uint256 hash[1];
    sph_shabal256_init(&amp;ctx_shabal);
    // ZSHABAL;
    sph_shabal256 (&amp;ctx_shabal, (pbegin == pend ? pblank : static_cast&lt;const void*&gt;(&amp;pbegin[0])), (pend - pbegin) * sizeof(pbegin[0]));
    sph_shabal256_close(&amp;ctx_shabal, static_cast&lt;void*&gt;(&amp;hash[0]));

    return hash[0];
}
What are pbegin &amp; pend ?


Pointers to the beginning of the data and one byte past the end of the data, respectively. The function it's wrapping takes a pointer to the beginning plus the the size, so it needs to do some math with the pointers.


  What is (I believe it is data, where it comes from ?)


Presumably, if you found this code in a Bitcoin derivative, the data is a block header. This function might also be used to build a merkle tree. (Shabal256 appears to be fast enough for that.)


  What is : pblank[1]


A zero-length string. Presumably, sometimes this function gets called as HashShabal(NULL, NULL), so this is for avoiding a null pointer exception.


  Can anyone please explain the code below with comments?


The purpose of this function appears to be to wrap the Shabal256 functions from Projet RNRT SAPHIR to make them easier to use.