X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=include%2Fyaz%2Fwrbuf.h;h=e7629d063c52e3d32a373206719c3253abd7a9e4;hb=e33389ee14d909d3a1b9874a40aa1b53c3fe42be;hp=b583ce2edabd48f47bec65a3dd422beda38f4b36;hpb=e529ed18a6825f980bb16b230e56c6d53743ced1;p=yaz-moved-to-github.git diff --git a/include/yaz/wrbuf.h b/include/yaz/wrbuf.h index b583ce2..e7629d0 100644 --- a/include/yaz/wrbuf.h +++ b/include/yaz/wrbuf.h @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2013 Index Data. + * Copyright (C) Index Data. * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -274,6 +274,27 @@ void wrbuf_iconv_json_write(WRBUF b, yaz_iconv_t cd, YAZ_EXPORT void wrbuf_iconv_json_puts(WRBUF b, yaz_iconv_t cd, const char *strz); +/** \brief writes SHA1 text to WRBUF + \param b result + \param cp char buffer + \param sz size of char buffer + \param hexit 1=hex mode; 0=binary + \returns 0 if successful + \returns -1 on error +*/ +YAZ_EXPORT +int wrbuf_sha1_write(WRBUF b, const char *cp, size_t sz, int hexit); + +/** \brief writes SHA1 text to WRBUF + \param b result + \param cp C-string + \param hexit 1=hex mode; 0=binary + \returns 0 if successful + \returns -1 on error +*/ +YAZ_EXPORT +int wrbuf_sha1_puts(WRBUF b, const char *cp, int hexit); + YAZ_END_CDECL #endif