On Mon, Mar 14, 2016 at 12:45 PM, Konstantin Tokarev <annu...@yandex.ru> wrote:
> > I have cryptographic digest function which returns result in a form > equivalent to const char* of known size. > Is there any way to construct WTF::Vector<uint8_t> from it without > resorting to memcpy? > You mean like handing off the buffer? I don't think Vector has such a capability at the moment. We normally pre-allocate Vector buffer and call whatever function with that buffer in cases like this. e.g. Vector<uint8_t> digest; digest.reserveInitialCapacity(digestSize); cryptographicDigest(source, digest.data(), digest.size()); - R. Niwa
_______________________________________________ webkit-help mailing list webkit-help@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-help