diff -r e59a989d890d -r 060a8cda7f62 dav/sync.h --- a/dav/sync.h Thu Mar 28 11:19:13 2019 +0100 +++ b/dav/sync.h Thu Mar 28 11:54:27 2019 +0100 @@ -1,7 +1,7 @@ /* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * - * Copyright 2018 Olaf Wintermann. All rights reserved. + * Copyright 2019 Olaf Wintermann. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -203,6 +203,20 @@ char* create_locktoken_file(const char *syncdirname, const char *locktoken); +/* + * if encryption is enabled, the crypto-hash is returned as hex string + * otherwise the content-hash is returned + */ +char* sync_get_content_hash(DavResource *res); + +/* + * if encryption is enabled, sets the crypto-hash property + * otherwise it sets the content-hash property + * + * hashdata must be raw sha256 data and 32 bytes long + */ +void sync_set_content_hash(DavResource *res, const char *hashdata); + #ifdef __cplusplus } #endif