/* This file is part of limb https://lila.oss/limb
* Copyright (C) 2023 Olivier Brunel jjk@jjacky.com */
/* SPDX-License-Identifier: GPL-2.0-only */
#include <limb/chacha20.h>
void
chacha20(void *dst, const void *key, const void *nonce, const void *msg, size_t mlen)
{
chacha20_ctx ctx;
chacha20_init(key, nonce, &ctx);
chacha20_crypt(dst, msg, mlen, &ctx);
chacha20_clear(&ctx);
}