Looks like no one has experience in that field. Because of that let me mention the workaround: You can always use one of the existing implementations in C and do sth like that:
#include "hbapi.h"
#include "hbapiitm.h"
HB_FUNC( FUNCTION_NAME_IN_HARBOUR )
{
PHB_ITEM pFirstParam = hb_param(1, HB_IT_STRING);
PHB_CODEPAGE cdp = hb_vmCDP();
const char* pFirst = hb_itemGetCPtr(pFirstParam);
//magic in C - You have a public key in the pFirst variable
hb_retnc(result);
}
I'm not sure of the correctness of the above pattern, but it would be my starting point.