istream-hash.c revision bcb4e51a409d94ae670de96afb8483a4f7855294
/* Copyright (c) 2013-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "hash-method.h"
#include "istream-private.h"
#include "istream-hash.h"
struct hash_istream {
struct istream_private istream;
const struct hash_method *method;
void *hash_context;
};
static ssize_t
{
const unsigned char *data;
}
} else if (ret < 0) {
/* we finished hashing it. don't access it anymore, because
the memory pointed by the hash may be freed before the
istream itself */
}
return ret;
}
static void
{
"Seeking not supported before hashing is finished");
}
}
struct istream *
void *hash_context)
{
struct hash_istream *hstream;
i_stream_get_fd(input), 0);
}