/* SPDX-License-Identifier: GPL-2.0 */



#ifndef _INTERNAL_DRBG_H
#define _INTERNAL_DRBG_H


static inline void drbg_cpu_to_be32(__u32 val, unsigned char *buf)
{
	struct s {
		__be32 conv;
	};
	struct s *conversion = (struct s *)buf;

	conversion->conv = cpu_to_be32(val);
}


struct drbg_string {
	const unsigned char *buf;
	size_t len;
	struct list_head list;
};

static inline void drbg_string_fill(struct drbg_string *string,
				    const unsigned char *buf, size_t len)
{
	string->buf = buf;
	string->len = len;
	INIT_LIST_HEAD(&string->list);
}

#endif //_INTERNAL_DRBG_H
