linux/fs/cachefiles/key.c

// SPDX-License-Identifier: GPL-2.0-or-later
/* Key to pathname encoder
 *
 * Copyright (C) 2021 Red Hat, Inc. All Rights Reserved.
 * Written by David Howells ([email protected])
 */

#include <linux/slab.h>
#include "internal.h"

static const char cachefiles_charmap[64] =				/* 62 - 63 */
	;

static const char cachefiles_filecharmap[256] =;

static inline unsigned int how_many_hex_digits(unsigned int x)
{}

/*
 * turn the raw key into something cooked
 * - the key may be up to NAME_MAX in length (including the length word)
 *   - "base64" encode the strange keys, mapping 3 bytes of raw to four of
 *     cooked
 *   - need to cut the cooked key into 252 char lengths (189 raw bytes)
 */
bool cachefiles_cook_key(struct cachefiles_object *object)
{}