\hypertarget{g__eli_8h_source}{}\doxysection{g\+\_\+eli.\+h}
\label{g__eli_8h_source}\index{geom/eli/g\_eli.h@{geom/eli/g\_eli.h}}
\mbox{\hyperlink{g__eli_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2005-\/2019 Pawel Jakub Dawidek <pawel@dawidek.net>}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00005}00005 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00007}00007 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00008}00008 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00009}00009 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00010}00010 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00012}00012 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00013}00013 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00014}00014 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00015}00015 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00016}00016 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00017}00017 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00018}00018 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00019}00019 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00020}00020 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00021}00021 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00022}00022 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00023}00023 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00024}00024 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00025}00025 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00026}00026 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00027}00027 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00028}00028 \textcolor{comment}{ * \$FreeBSD\$}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00029}00029 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00030}00030 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00031}00031 \textcolor{preprocessor}{\#ifndef \_G\_ELI\_H\_}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00032}00032 \textcolor{preprocessor}{\#define \_G\_ELI\_H\_}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00033}00033 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00034}00034 \textcolor{preprocessor}{\#include <sys/endian.h>}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00035}00035 \textcolor{preprocessor}{\#include <sys/errno.h>}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00036}00036 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00037}00037 \textcolor{preprocessor}{\#include <crypto/sha2/sha256.h>}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00038}00038 \textcolor{preprocessor}{\#include <crypto/sha2/sha512.h>}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00039}00039 \textcolor{preprocessor}{\#include <opencrypto/cryptodev.h>}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00040}00040 \textcolor{preprocessor}{\#ifdef \_KERNEL}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00041}00041 \textcolor{preprocessor}{\#include <sys/bio.h>}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00042}00042 \textcolor{preprocessor}{\#include <sys/libkern.h>}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00043}00043 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00044}00044 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00045}00045 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{geom_8h}{geom/geom.h}}>}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00046}00046 \textcolor{preprocessor}{\#include <crypto/intake.h>}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00047}00047 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00048}00048 \textcolor{preprocessor}{\#include <assert.h>}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00049}00049 \textcolor{preprocessor}{\#include <stdio.h>}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00050}00050 \textcolor{preprocessor}{\#include <string.h>}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00051}00051 \textcolor{preprocessor}{\#include <strings.h>}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00052}00052 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00053}00053 \textcolor{preprocessor}{\#include <sys/queue.h>}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00054}00054 \textcolor{preprocessor}{\#include <sys/tree.h>}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00055}00055 \textcolor{preprocessor}{\#ifndef \_OpenSSL\_}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00056}00056 \textcolor{preprocessor}{\#include <sys/md5.h>}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00057}00057 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00058}00058 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00059}\mbox{\hyperlink{g__eli_8h_a93782e206facb574ed8c4b0dfefbd4d2}{00059}} \textcolor{preprocessor}{\#define G\_ELI\_CLASS\_NAME        "{}ELI"{}}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00060}\mbox{\hyperlink{g__eli_8h_a46bf6203c4467768cb63cbb6117b4294}{00060}} \textcolor{preprocessor}{\#define G\_ELI\_MAGIC             "{}GEOM::ELI"{}}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00061}\mbox{\hyperlink{g__eli_8h_a01ed98ac0b9d4605a028d6311aa090e8}{00061}} \textcolor{preprocessor}{\#define G\_ELI\_SUFFIX            "{}.eli"{}}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00062}00062 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00063}00063 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00064}00064 \textcolor{comment}{ * Version history:}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00065}00065 \textcolor{comment}{ * 0 -\/ Initial version number.}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00066}00066 \textcolor{comment}{ * 1 -\/ Added data authentication support (md\_aalgo field and}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00067}00067 \textcolor{comment}{ *     G\_ELI\_FLAG\_AUTH flag).}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00068}00068 \textcolor{comment}{ * 2 -\/ Added G\_ELI\_FLAG\_READONLY.}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00069}00069 \textcolor{comment}{ * 3 -\/ Added 'configure' subcommand.}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00070}00070 \textcolor{comment}{ * 4 -\/ IV is generated from offset converted to little-\/endian}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00071}00071 \textcolor{comment}{ *     (the G\_ELI\_FLAG\_NATIVE\_BYTE\_ORDER flag will be set for older versions).}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00072}00072 \textcolor{comment}{ * 5 -\/ Added multiple encrypton keys and AES-\/XTS support.}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00073}00073 \textcolor{comment}{ * 6 -\/ Fixed usage of multiple keys for authenticated providers (the}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00074}00074 \textcolor{comment}{ *     G\_ELI\_FLAG\_FIRST\_KEY flag will be set for older versions).}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00075}00075 \textcolor{comment}{ * 7 -\/ Encryption keys are now generated from the Data Key and not from the}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00076}00076 \textcolor{comment}{ *     IV Key (the G\_ELI\_FLAG\_ENC\_IVKEY flag will be set for older versions).}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00077}00077 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00078}\mbox{\hyperlink{g__eli_8h_a89335e04094479ba6c5aac39071bca9c}{00078}} \textcolor{preprocessor}{\#define G\_ELI\_VERSION\_00        0}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00079}\mbox{\hyperlink{g__eli_8h_a784cc440e91cbb28a7305b2eb1cf1349}{00079}} \textcolor{preprocessor}{\#define G\_ELI\_VERSION\_01        1}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00080}\mbox{\hyperlink{g__eli_8h_ab513e78ad7e5d376c514d66436125d47}{00080}} \textcolor{preprocessor}{\#define G\_ELI\_VERSION\_02        2}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00081}\mbox{\hyperlink{g__eli_8h_a9abb63927459a095a555549c3ece3f94}{00081}} \textcolor{preprocessor}{\#define G\_ELI\_VERSION\_03        3}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00082}\mbox{\hyperlink{g__eli_8h_a9137ce1d627b02b66d1d010c45c8ff23}{00082}} \textcolor{preprocessor}{\#define G\_ELI\_VERSION\_04        4}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00083}\mbox{\hyperlink{g__eli_8h_a66fcd7e171885dc792b053dd6e2d8965}{00083}} \textcolor{preprocessor}{\#define G\_ELI\_VERSION\_05        5}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00084}\mbox{\hyperlink{g__eli_8h_a5fdab18ff1d1cbd969e6d739b49db736}{00084}} \textcolor{preprocessor}{\#define G\_ELI\_VERSION\_06        6}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00085}\mbox{\hyperlink{g__eli_8h_a17e89e9812752f25a89e88aeb7c6ec7f}{00085}} \textcolor{preprocessor}{\#define G\_ELI\_VERSION\_07        7}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00086}\mbox{\hyperlink{g__eli_8h_ab008623662537df1abcfc6d0c20e93c1}{00086}} \textcolor{preprocessor}{\#define G\_ELI\_VERSION           G\_ELI\_VERSION\_07}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00087}00087 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00088}00088 \textcolor{comment}{/* ON DISK FLAGS. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00089}00089 \textcolor{comment}{/* Use random, onetime keys. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00090}\mbox{\hyperlink{g__eli_8h_a50453da3fa0881f2a73d51ec9205d2be}{00090}} \textcolor{preprocessor}{\#define G\_ELI\_FLAG\_ONETIME              0x00000001}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00091}00091 \textcolor{comment}{/* Ask for the passphrase from the kernel, before mounting root. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00092}\mbox{\hyperlink{g__eli_8h_a29772f14391c3c1f5a3a46bfb17bc976}{00092}} \textcolor{preprocessor}{\#define G\_ELI\_FLAG\_BOOT                 0x00000002}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00093}00093 \textcolor{comment}{/* Detach on last close, if we were open for writing. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00094}\mbox{\hyperlink{g__eli_8h_a43d5cf6f91862d2a6c2910bd9e722b96}{00094}} \textcolor{preprocessor}{\#define G\_ELI\_FLAG\_WO\_DETACH            0x00000004}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00095}00095 \textcolor{comment}{/* Detach on last close. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00096}\mbox{\hyperlink{g__eli_8h_a48c237bf1c3ffb624048745c72a8370d}{00096}} \textcolor{preprocessor}{\#define G\_ELI\_FLAG\_RW\_DETACH            0x00000008}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00097}00097 \textcolor{comment}{/* Provide data authentication. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00098}\mbox{\hyperlink{g__eli_8h_a723b90905e6c7f8485c4723967759d84}{00098}} \textcolor{preprocessor}{\#define G\_ELI\_FLAG\_AUTH                 0x00000010}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00099}00099 \textcolor{comment}{/* Provider is read-\/only, we should deny all write attempts. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00100}\mbox{\hyperlink{g__eli_8h_a6df3f8f55142a6f1ee2be41835adb7bd}{00100}} \textcolor{preprocessor}{\#define G\_ELI\_FLAG\_RO                   0x00000020}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00101}00101 \textcolor{comment}{/* Don't pass through BIO\_DELETE requests. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00102}\mbox{\hyperlink{g__eli_8h_a00997fef11f4d833ccf9b5598646bb3a}{00102}} \textcolor{preprocessor}{\#define G\_ELI\_FLAG\_NODELETE             0x00000040}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00103}00103 \textcolor{comment}{/* This GELI supports GELIBoot */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00104}\mbox{\hyperlink{g__eli_8h_a22218b196828cbf802d45be709b91f86}{00104}} \textcolor{preprocessor}{\#define G\_ELI\_FLAG\_GELIBOOT             0x00000080}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00105}00105 \textcolor{comment}{/* Hide passphrase length in GELIboot. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00106}\mbox{\hyperlink{g__eli_8h_aa392f69ce5377918074f573d9fae9623}{00106}} \textcolor{preprocessor}{\#define G\_ELI\_FLAG\_GELIDISPLAYPASS      0x00000100}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00107}00107 \textcolor{comment}{/* Expand provider automatically. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00108}\mbox{\hyperlink{g__eli_8h_acfe6d43486b1b461f1b3e3ed78474603}{00108}} \textcolor{preprocessor}{\#define G\_ELI\_FLAG\_AUTORESIZE           0x00000200}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00109}00109 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00110}00110 \textcolor{comment}{/* RUNTIME FLAGS. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00111}00111 \textcolor{comment}{/* Provider was open for writing. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00112}\mbox{\hyperlink{g__eli_8h_aa38919e6550606c0b810a8e73bba5d88}{00112}} \textcolor{preprocessor}{\#define G\_ELI\_FLAG\_WOPEN                0x00010000}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00113}00113 \textcolor{comment}{/* Destroy device. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00114}\mbox{\hyperlink{g__eli_8h_ad43914957f224bc3661747e545ca396d}{00114}} \textcolor{preprocessor}{\#define G\_ELI\_FLAG\_DESTROY              0x00020000}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00115}00115 \textcolor{comment}{/* Provider uses native byte-\/order for IV generation. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00116}\mbox{\hyperlink{g__eli_8h_aadf5b5c7223ca0c58183c6b87de8acd0}{00116}} \textcolor{preprocessor}{\#define G\_ELI\_FLAG\_NATIVE\_BYTE\_ORDER    0x00040000}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00117}00117 \textcolor{comment}{/* Provider uses single encryption key. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00118}\mbox{\hyperlink{g__eli_8h_a0440d24008eaa5fe7620843804fecc7a}{00118}} \textcolor{preprocessor}{\#define G\_ELI\_FLAG\_SINGLE\_KEY           0x00080000}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00119}00119 \textcolor{comment}{/* Device suspended. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00120}\mbox{\hyperlink{g__eli_8h_a5d55b57a8415e1d89dcde37fe842a9f8}{00120}} \textcolor{preprocessor}{\#define G\_ELI\_FLAG\_SUSPEND              0x00100000}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00121}00121 \textcolor{comment}{/* Provider uses first encryption key. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00122}\mbox{\hyperlink{g__eli_8h_acafc9dd961af3f154c01c7dbc38fea0d}{00122}} \textcolor{preprocessor}{\#define G\_ELI\_FLAG\_FIRST\_KEY            0x00200000}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00123}00123 \textcolor{comment}{/* Provider uses IV-\/Key for encryption key generation. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00124}\mbox{\hyperlink{g__eli_8h_adb32d9869b3bb0f00fa1cc7bb85990b1}{00124}} \textcolor{preprocessor}{\#define G\_ELI\_FLAG\_ENC\_IVKEY            0x00400000}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00125}00125 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00126}00126 \textcolor{comment}{/* BIO pflag values. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00127}\mbox{\hyperlink{g__eli_8h_a3e9d70292b77322f9aa3163f69ce0061}{00127}} \textcolor{preprocessor}{\#define G\_ELI\_WORKER(pflags)    ((pflags) \& 0xff)}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00128}\mbox{\hyperlink{g__eli_8h_a1ef327b8a6f54c2cde14c29a39f6fc9a}{00128}} \textcolor{preprocessor}{\#define G\_ELI\_MAX\_WORKERS       255}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00129}\mbox{\hyperlink{g__eli_8h_a15024cef30662f0163a81ae3a581fed9}{00129}} \textcolor{preprocessor}{\#define G\_ELI\_NEW\_BIO           G\_ELI\_MAX\_WORKERS}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00130}\mbox{\hyperlink{g__eli_8h_af68c35f19b3961e7bbc34727a802c574}{00130}} \textcolor{preprocessor}{\#define G\_ELI\_SETWORKER(pflags, w)      \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00131}00131 \textcolor{preprocessor}{    (pflags) = ((pflags) \& 0xff00) | ((w) \& 0xff)}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00132}\mbox{\hyperlink{g__eli_8h_aa1ca2933bff3782d10bb25f35c58d2d4}{00132}} \textcolor{preprocessor}{\#define G\_ELI\_SET\_NEW\_BIO(pflags)       G\_ELI\_SETWORKER((pflags), G\_ELI\_NEW\_BIO)}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00133}\mbox{\hyperlink{g__eli_8h_ac9297ed4277b44d4f5ae53830fff78c8}{00133}} \textcolor{preprocessor}{\#define G\_ELI\_IS\_NEW\_BIO(pflags)        (G\_ELI\_WORKER(pflags) == G\_ELI\_NEW\_BIO)}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00134}\mbox{\hyperlink{g__eli_8h_ac29e3a98275e42c5f962d9850ed905d4}{00134}} \textcolor{preprocessor}{\#define G\_ELI\_UMA\_ALLOC         0x100   }\textcolor{comment}{/* bio\_driver2 alloc came from UMA */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00135}00135 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00136}\mbox{\hyperlink{g__eli_8h_a54d6e8690a9994410675db19dea8dacb}{00136}} \textcolor{preprocessor}{\#define SHA512\_MDLEN            64}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00137}\mbox{\hyperlink{g__eli_8h_a5419372124165c27b5251a5059e46607}{00137}} \textcolor{preprocessor}{\#define G\_ELI\_AUTH\_SECKEYLEN    SHA256\_DIGEST\_LENGTH}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00138}00138 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00139}\mbox{\hyperlink{g__eli_8h_abb1d3eb1d3c15da2395385de4d58cf81}{00139}} \textcolor{preprocessor}{\#define G\_ELI\_MAXMKEYS          2}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00140}\mbox{\hyperlink{g__eli_8h_aec1ec73171d7f9f52740b5890ee2615e}{00140}} \textcolor{preprocessor}{\#define G\_ELI\_MAXKEYLEN         64}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00141}\mbox{\hyperlink{g__eli_8h_a5b5012c2878a9fc13f28fd837b163c3f}{00141}} \textcolor{preprocessor}{\#define G\_ELI\_USERKEYLEN        G\_ELI\_MAXKEYLEN}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00142}\mbox{\hyperlink{g__eli_8h_a7732e68e5347389c8b740583a43a7b08}{00142}} \textcolor{preprocessor}{\#define G\_ELI\_DATAKEYLEN        G\_ELI\_MAXKEYLEN}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00143}\mbox{\hyperlink{g__eli_8h_a4eac189560106ecdd0fe80cc1cf8730e}{00143}} \textcolor{preprocessor}{\#define G\_ELI\_AUTHKEYLEN        G\_ELI\_MAXKEYLEN}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00144}\mbox{\hyperlink{g__eli_8h_aacfddc35d53df02c12b22cc5c25dcf75}{00144}} \textcolor{preprocessor}{\#define G\_ELI\_IVKEYLEN          G\_ELI\_MAXKEYLEN}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00145}\mbox{\hyperlink{g__eli_8h_a3777eb3a24a80890f3e3a36e8977efca}{00145}} \textcolor{preprocessor}{\#define G\_ELI\_SALTLEN           64}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00146}\mbox{\hyperlink{g__eli_8h_aee6be3564eb1e7728a07e0a64441d7f5}{00146}} \textcolor{preprocessor}{\#define G\_ELI\_DATAIVKEYLEN      (G\_ELI\_DATAKEYLEN + G\_ELI\_IVKEYLEN)}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00147}00147 \textcolor{comment}{/* Data-\/Key, IV-\/Key, HMAC\_SHA512(Derived-\/Key, Data-\/Key+IV-\/Key) */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00148}\mbox{\hyperlink{g__eli_8h_a91be18a4ef2a9aa3d1373c347cea7edb}{00148}} \textcolor{preprocessor}{\#define G\_ELI\_MKEYLEN           (G\_ELI\_DATAIVKEYLEN + SHA512\_MDLEN)}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00149}\mbox{\hyperlink{g__eli_8h_a890ab6f9229a71c31754ccfba18b9c9e}{00149}} \textcolor{preprocessor}{\#define G\_ELI\_OVERWRITES        5}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00150}00150 \textcolor{comment}{/* Switch data encryption key every 2\string^20 blocks. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00151}\mbox{\hyperlink{g__eli_8h_ab8cfe0383780aeb7d7f5ea6c9d2b1cea}{00151}} \textcolor{preprocessor}{\#define G\_ELI\_KEY\_SHIFT         20}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00152}00152 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00153}\mbox{\hyperlink{g__eli_8h_a124c07ee05e88fde379ea25ed1fa708a}{00153}} \textcolor{preprocessor}{\#define G\_ELI\_CRYPTO\_UNKNOWN    0}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00154}\mbox{\hyperlink{g__eli_8h_a063494b31a4afd3d79c0be88feb30ead}{00154}} \textcolor{preprocessor}{\#define G\_ELI\_CRYPTO\_HW         1}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00155}\mbox{\hyperlink{g__eli_8h_aada58228e9237dad2cc51545ee7471d8}{00155}} \textcolor{preprocessor}{\#define G\_ELI\_CRYPTO\_SW         2}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00156}\mbox{\hyperlink{g__eli_8h_aaf98e60410d01250f6761143dc54edba}{00156}} \textcolor{preprocessor}{\#define G\_ELI\_CRYPTO\_SW\_ACCEL   3}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00157}00157 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00158}00158 \textcolor{preprocessor}{\#ifdef \_KERNEL}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00159}00159 \textcolor{preprocessor}{\#if (MAX\_KEY\_BYTES < G\_ELI\_DATAIVKEYLEN)}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00160}00160 \textcolor{preprocessor}{\#error "{}MAX\_KEY\_BYTES is less than G\_ELI\_DATAKEYLEN"{}}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00161}00161 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00162}00162 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00163}00163 \textcolor{keyword}{extern} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__eli_8h_a9619360cdc04fb65a57cf8aa6ec918da}{g\_eli\_debug}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00164}00164 \textcolor{keyword}{extern} u\_int \mbox{\hyperlink{g__eli_8h_a704e93b0165f740d53c96f3b5be78550}{g\_eli\_overwrites}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00165}00165 \textcolor{keyword}{extern} u\_int \mbox{\hyperlink{g__eli_8h_a4bd2c4ca8397244a2841fcc2627d3d31}{g\_eli\_batch}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00166}00166 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00167}\mbox{\hyperlink{g__eli_8h_ad99f556222c6099625689315eadadd9d}{00167}} \textcolor{preprocessor}{\#define G\_ELI\_DEBUG(lvl, ...) \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00168}00168 \textcolor{preprocessor}{    \_GEOM\_DEBUG("{}GEOM\_ELI"{}}, g\_eli\_debug, (lvl), NULL, \_\_VA\_ARGS\_\_)}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00169}\mbox{\hyperlink{g__eli_8h_a779a345687882e70738352745e022c14}{00169}} \textcolor{preprocessor}{\#define G\_ELI\_LOGREQ(lvl, bp, ...) \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00170}00170 \textcolor{preprocessor}{    \_GEOM\_DEBUG("{}GEOM\_ELI"{}}, g\_eli\_debug, (lvl), (bp), \_\_VA\_ARGS\_\_)}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00171}00171 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00172}\mbox{\hyperlink{structg__eli__worker}{00172}} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__eli__worker}{g\_eli\_worker}} \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00173}\mbox{\hyperlink{structg__eli__worker_a529a3f8b3a7f2e96b3715b8f5d507495}{00173}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__eli__softc}{g\_eli\_softc}}   *\mbox{\hyperlink{structg__eli__worker_a529a3f8b3a7f2e96b3715b8f5d507495}{w\_softc}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00174}\mbox{\hyperlink{structg__eli__worker_a1afc0b00100ad27fa2aa618d95f1d158}{00174}}         \textcolor{keyword}{struct }proc             *\mbox{\hyperlink{structg__eli__worker_a1afc0b00100ad27fa2aa618d95f1d158}{w\_proc}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00175}\mbox{\hyperlink{structg__eli__worker_a1f753561e8230107d202ec9926eb1539}{00175}}         \textcolor{keywordtype}{void}                    *\mbox{\hyperlink{structg__eli__worker_a1f753561e8230107d202ec9926eb1539}{w\_first\_key}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00176}\mbox{\hyperlink{structg__eli__worker_a5fce4959d9d95297e1b5802b03654fdd}{00176}}         u\_int                    \mbox{\hyperlink{structg__eli__worker_a5fce4959d9d95297e1b5802b03654fdd}{w\_number}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00177}\mbox{\hyperlink{structg__eli__worker_a4955ad236cfa9a87082d550fe7f7c061}{00177}}         crypto\_session\_t         \mbox{\hyperlink{structg__eli__worker_a4955ad236cfa9a87082d550fe7f7c061}{w\_sid}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00178}\mbox{\hyperlink{structg__eli__worker_a33b07dcf1ffd9dd8e62709dad9d7b76a}{00178}}         boolean\_t                \mbox{\hyperlink{structg__eli__worker_a33b07dcf1ffd9dd8e62709dad9d7b76a}{w\_active}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00179}\mbox{\hyperlink{structg__eli__worker_a40ecba97723de1f5194cc336ba778245}{00179}}         \mbox{\hyperlink{structg__eli__worker_a40ecba97723de1f5194cc336ba778245}{LIST\_ENTRY}}(\mbox{\hyperlink{structg__eli__worker}{g\_eli\_worker}}) w\_next;}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00180}00180 \};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00181}00181 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00182}00182 \textcolor{preprocessor}{\#endif  }\textcolor{comment}{/* \_KERNEL */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00183}00183 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00184}\mbox{\hyperlink{structg__eli__softc}{00184}} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__eli__softc}{g\_eli\_softc}} \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00185}\mbox{\hyperlink{structg__eli__softc_a899949202205997147c78c52b32b9843}{00185}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}}     *\mbox{\hyperlink{structg__eli__softc_a899949202205997147c78c52b32b9843}{sc\_geom}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00186}\mbox{\hyperlink{structg__eli__softc_af941b225252f65e38a1ea020ce4eb35d}{00186}}         u\_int            \mbox{\hyperlink{structg__eli__softc_af941b225252f65e38a1ea020ce4eb35d}{sc\_version}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00187}\mbox{\hyperlink{structg__eli__softc_a7a47e0297c054c5f2ff0c9b02bf00011}{00187}}         u\_int            \mbox{\hyperlink{structg__eli__softc_a7a47e0297c054c5f2ff0c9b02bf00011}{sc\_crypto}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00188}\mbox{\hyperlink{structg__eli__softc_a8581b85c073273bcbb556b18d5932b10}{00188}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}           \mbox{\hyperlink{structg__eli__softc_a8581b85c073273bcbb556b18d5932b10}{sc\_mkey}}[\mbox{\hyperlink{g__eli_8h_aee6be3564eb1e7728a07e0a64441d7f5}{G\_ELI\_DATAIVKEYLEN}}];}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00189}\mbox{\hyperlink{structg__eli__softc_a23352840c391565e85bd18ca4a72320e}{00189}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}           \mbox{\hyperlink{structg__eli__softc_a23352840c391565e85bd18ca4a72320e}{sc\_ekey}}[\mbox{\hyperlink{g__eli_8h_a7732e68e5347389c8b740583a43a7b08}{G\_ELI\_DATAKEYLEN}}];}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00190}\mbox{\hyperlink{structg__eli__softc_a8321b0c06505292a55bdeeccdaeb36a6}{00190}}         \mbox{\hyperlink{structg__eli__softc_a8321b0c06505292a55bdeeccdaeb36a6}{TAILQ\_HEAD}}(, \mbox{\hyperlink{structg__eli__key}{g\_eli\_key}}) sc\_ekeys\_queue;}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00191}\mbox{\hyperlink{structg__eli__softc_a499b5d12a5cb541464657b313fba52de}{00191}}         \mbox{\hyperlink{structg__eli__softc_a499b5d12a5cb541464657b313fba52de}{RB\_HEAD}}(g\_eli\_key\_tree, \mbox{\hyperlink{structg__eli__key}{g\_eli\_key}}) sc\_ekeys\_tree;}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00192}00192 \textcolor{preprocessor}{\#ifndef \_STANDALONE}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00193}\mbox{\hyperlink{structg__eli__softc_aeaed9e283a3ee539995fcfa127e67bed}{00193}}         \textcolor{keyword}{struct }mtx       \mbox{\hyperlink{structg__eli__softc_aeaed9e283a3ee539995fcfa127e67bed}{sc\_ekeys\_lock}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00194}00194 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00195}\mbox{\hyperlink{structg__eli__softc_addf43ecb1aadd3f61593aa388b4742a4}{00195}}         uint64\_t         \mbox{\hyperlink{structg__eli__softc_addf43ecb1aadd3f61593aa388b4742a4}{sc\_ekeys\_total}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00196}\mbox{\hyperlink{structg__eli__softc_a79fd16c488c0d5c510b56c944364218d}{00196}}         uint64\_t         \mbox{\hyperlink{structg__eli__softc_a79fd16c488c0d5c510b56c944364218d}{sc\_ekeys\_allocated}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00197}\mbox{\hyperlink{structg__eli__softc_aecc6e7e7b1b2e05b9ded85a9ab763d74}{00197}}         u\_int            \mbox{\hyperlink{structg__eli__softc_aecc6e7e7b1b2e05b9ded85a9ab763d74}{sc\_ealgo}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00198}\mbox{\hyperlink{structg__eli__softc_a67c3362eed360679f3c4b8a9408dd736}{00198}}         u\_int            \mbox{\hyperlink{structg__eli__softc_a67c3362eed360679f3c4b8a9408dd736}{sc\_ekeylen}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00199}\mbox{\hyperlink{structg__eli__softc_a01aee1422eec5048a657dfab2a70518f}{00199}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}           \mbox{\hyperlink{structg__eli__softc_a01aee1422eec5048a657dfab2a70518f}{sc\_akey}}[\mbox{\hyperlink{g__eli_8h_a4eac189560106ecdd0fe80cc1cf8730e}{G\_ELI\_AUTHKEYLEN}}];}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00200}\mbox{\hyperlink{structg__eli__softc_a03838413934611b56f3e955c600d28c7}{00200}}         u\_int            \mbox{\hyperlink{structg__eli__softc_a03838413934611b56f3e955c600d28c7}{sc\_aalgo}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00201}\mbox{\hyperlink{structg__eli__softc_ade183f81eb3c9912f067501f944aa10a}{00201}}         u\_int            \mbox{\hyperlink{structg__eli__softc_ade183f81eb3c9912f067501f944aa10a}{sc\_akeylen}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00202}\mbox{\hyperlink{structg__eli__softc_a50a1a9f02bbadd3471006e5dfc65ac8a}{00202}}         u\_int            \mbox{\hyperlink{structg__eli__softc_a50a1a9f02bbadd3471006e5dfc65ac8a}{sc\_alen}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00203}\mbox{\hyperlink{structg__eli__softc_ae776cdeaee3f3200f063487b5064d7dd}{00203}}         SHA256\_CTX       \mbox{\hyperlink{structg__eli__softc_ae776cdeaee3f3200f063487b5064d7dd}{sc\_akeyctx}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00204}\mbox{\hyperlink{structg__eli__softc_a35a1d558d42d78a52715771803ee042e}{00204}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}           \mbox{\hyperlink{structg__eli__softc_a35a1d558d42d78a52715771803ee042e}{sc\_ivkey}}[\mbox{\hyperlink{g__eli_8h_aacfddc35d53df02c12b22cc5c25dcf75}{G\_ELI\_IVKEYLEN}}];}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00205}\mbox{\hyperlink{structg__eli__softc_a7e01f366939fc752d121f7a6bc352675}{00205}}         SHA256\_CTX       \mbox{\hyperlink{structg__eli__softc_a7e01f366939fc752d121f7a6bc352675}{sc\_ivctx}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00206}\mbox{\hyperlink{structg__eli__softc_aa5916039b76c3ba1a57f6fc3855372b1}{00206}}         \textcolor{keywordtype}{int}              \mbox{\hyperlink{structg__eli__softc_aa5916039b76c3ba1a57f6fc3855372b1}{sc\_nkey}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00207}\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{00207}}         uint32\_t         \mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00208}\mbox{\hyperlink{structg__eli__softc_a239cdf3f405f19bdfe897bd9d1de8a37}{00208}}         \textcolor{keywordtype}{int}              \mbox{\hyperlink{structg__eli__softc_a239cdf3f405f19bdfe897bd9d1de8a37}{sc\_inflight}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00209}\mbox{\hyperlink{structg__eli__softc_a886bea13cc2ca3e3e7b459d97d2459f5}{00209}}         off\_t            \mbox{\hyperlink{structg__eli__softc_a886bea13cc2ca3e3e7b459d97d2459f5}{sc\_mediasize}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00210}\mbox{\hyperlink{structg__eli__softc_a98f6d4510dc5541540fbb45883782c9f}{00210}}         \textcolor{keywordtype}{size\_t}           \mbox{\hyperlink{structg__eli__softc_a98f6d4510dc5541540fbb45883782c9f}{sc\_sectorsize}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00211}\mbox{\hyperlink{structg__eli__softc_ade1e394db940df80bb59ab74c0df8bc4}{00211}}         off\_t            \mbox{\hyperlink{structg__eli__softc_ade1e394db940df80bb59ab74c0df8bc4}{sc\_provsize}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00212}\mbox{\hyperlink{structg__eli__softc_a6212e3d8c829bd8dd2bbd1d371b910e0}{00212}}         u\_int            \mbox{\hyperlink{structg__eli__softc_a6212e3d8c829bd8dd2bbd1d371b910e0}{sc\_bytes\_per\_sector}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00213}\mbox{\hyperlink{structg__eli__softc_a7096457a870bb699d5cd9d3beb0313e7}{00213}}         u\_int            \mbox{\hyperlink{structg__eli__softc_a7096457a870bb699d5cd9d3beb0313e7}{sc\_data\_per\_sector}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00214}00214 \textcolor{preprocessor}{\#ifndef \_KERNEL}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00215}00215         \textcolor{keywordtype}{int}              \mbox{\hyperlink{structg__eli__softc_a8a031e3243317be28b5b6e55f00dc6ed}{sc\_cpubind}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00216}00216 \textcolor{preprocessor}{\#else }\textcolor{comment}{/* \_KERNEL */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00217}\mbox{\hyperlink{structg__eli__softc_a8a031e3243317be28b5b6e55f00dc6ed}{00217}}         boolean\_t        \mbox{\hyperlink{structg__eli__softc_a8a031e3243317be28b5b6e55f00dc6ed}{sc\_cpubind}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00218}00218 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00219}00219         \textcolor{comment}{/* Only for software cryptography. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00220}\mbox{\hyperlink{structg__eli__softc_a382b39bbf7408a27d7970dbb32bcdbcc}{00220}}         \textcolor{keyword}{struct }bio\_queue\_head \mbox{\hyperlink{structg__eli__softc_a382b39bbf7408a27d7970dbb32bcdbcc}{sc\_queue}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00221}\mbox{\hyperlink{structg__eli__softc_a972ab3f6da1b3d16ead41a4c2cc5a574}{00221}}         \textcolor{keyword}{struct }mtx       \mbox{\hyperlink{structg__eli__softc_a972ab3f6da1b3d16ead41a4c2cc5a574}{sc\_queue\_mtx}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00222}\mbox{\hyperlink{structg__eli__softc_aa95eb4e01229218a8717d14987a7e0ff}{00222}}         \mbox{\hyperlink{structg__eli__softc_aa95eb4e01229218a8717d14987a7e0ff}{LIST\_HEAD}}(, \mbox{\hyperlink{structg__eli__worker}{g\_eli\_worker}}) sc\_workers;}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00223}00223 \textcolor{preprocessor}{\#endif }\textcolor{comment}{/* \_KERNEL */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00224}00224 \};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00225}\mbox{\hyperlink{g__eli_8h_ab047d2e3041c744656fa453cd79df3e5}{00225}} \textcolor{preprocessor}{\#define sc\_name          sc\_geom-\/>name}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00226}00226 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00227}\mbox{\hyperlink{g__eli_8h_a8016668c3138460b2912154d099e1c43}{00227}} \textcolor{preprocessor}{\#define G\_ELI\_KEY\_MAGIC 0xe11341c}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00228}00228 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00229}\mbox{\hyperlink{structg__eli__key}{00229}} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__eli__key}{g\_eli\_key}} \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00230}00230         \textcolor{comment}{/* Key value, must be first in the structure. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00231}\mbox{\hyperlink{structg__eli__key_ab17ea58ccc262b9c8b90f785f63ecae6}{00231}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structg__eli__key_ab17ea58ccc262b9c8b90f785f63ecae6}{gek\_key}}[\mbox{\hyperlink{g__eli_8h_a7732e68e5347389c8b740583a43a7b08}{G\_ELI\_DATAKEYLEN}}];}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00232}00232         \textcolor{comment}{/* Magic. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00233}\mbox{\hyperlink{structg__eli__key_a0cc9445fd08397ecc1a902c065a86631}{00233}}         \textcolor{keywordtype}{int}             \mbox{\hyperlink{structg__eli__key_a0cc9445fd08397ecc1a902c065a86631}{gek\_magic}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00234}00234         \textcolor{comment}{/* Key number. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00235}\mbox{\hyperlink{structg__eli__key_a52688902d6e7306fc4f468ac3c9e9334}{00235}}         uint64\_t        \mbox{\hyperlink{structg__eli__key_a52688902d6e7306fc4f468ac3c9e9334}{gek\_keyno}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00236}00236         \textcolor{comment}{/* Reference counter. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00237}\mbox{\hyperlink{structg__eli__key_a9812b097be2b483ad61eb367e80ef8e3}{00237}}         \textcolor{keywordtype}{int}             \mbox{\hyperlink{structg__eli__key_a9812b097be2b483ad61eb367e80ef8e3}{gek\_count}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00238}00238         \textcolor{comment}{/* Keeps keys sorted by most recent use. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00239}\mbox{\hyperlink{structg__eli__key_a18f19171eae10f54c5dfd6be9ca1e594}{00239}}         \mbox{\hyperlink{structg__eli__key_a18f19171eae10f54c5dfd6be9ca1e594}{TAILQ\_ENTRY}}(\mbox{\hyperlink{structg__eli__key}{g\_eli\_key}}) gek\_next;}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00240}00240         \textcolor{comment}{/* Keeps keys sorted by number. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00241}\mbox{\hyperlink{structg__eli__key_a8e06436743a72f87ffaff42997e5ccaf}{00241}}         \mbox{\hyperlink{structg__eli__key_a8e06436743a72f87ffaff42997e5ccaf}{RB\_ENTRY}}(\mbox{\hyperlink{structg__eli__key}{g\_eli\_key}}) gek\_link;}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00242}00242 \};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00243}00243 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00244}\mbox{\hyperlink{structg__eli__metadata}{00244}} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__eli__metadata}{g\_eli\_metadata}} \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00245}\mbox{\hyperlink{structg__eli__metadata_aeb6a39d396a7deb9d8b3270313d9dd4f}{00245}}         \textcolor{keywordtype}{char}            \mbox{\hyperlink{structg__eli__metadata_aeb6a39d396a7deb9d8b3270313d9dd4f}{md\_magic}}[16];   \textcolor{comment}{/* Magic value. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00246}\mbox{\hyperlink{structg__eli__metadata_ab2df4c07f7d136cfd6d962af2442f833}{00246}}         uint32\_t        \mbox{\hyperlink{structg__eli__metadata_ab2df4c07f7d136cfd6d962af2442f833}{md\_version}};   \textcolor{comment}{/* Version number. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00247}\mbox{\hyperlink{structg__eli__metadata_a49218b2094d04c2b1519ab966462da94}{00247}}         uint32\_t        \mbox{\hyperlink{structg__eli__metadata_a49218b2094d04c2b1519ab966462da94}{md\_flags}};       \textcolor{comment}{/* Additional flags. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00248}\mbox{\hyperlink{structg__eli__metadata_ab104ed527e62f73f3d80fba974a38456}{00248}}         uint16\_t        \mbox{\hyperlink{structg__eli__metadata_ab104ed527e62f73f3d80fba974a38456}{md\_ealgo}};       \textcolor{comment}{/* Encryption algorithm. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00249}\mbox{\hyperlink{structg__eli__metadata_a5527b37bf36a0f83967c9334a6f8b134}{00249}}         uint16\_t        \mbox{\hyperlink{structg__eli__metadata_a5527b37bf36a0f83967c9334a6f8b134}{md\_keylen}};     \textcolor{comment}{/* Key length. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00250}\mbox{\hyperlink{structg__eli__metadata_acc0b001372f5cb147d3c1e6348bd2f0d}{00250}}         uint16\_t        \mbox{\hyperlink{structg__eli__metadata_acc0b001372f5cb147d3c1e6348bd2f0d}{md\_aalgo}};       \textcolor{comment}{/* Authentication algorithm. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00251}\mbox{\hyperlink{structg__eli__metadata_aa0d8828da846afa321340ac78a42ff95}{00251}}         uint64\_t        \mbox{\hyperlink{structg__eli__metadata_aa0d8828da846afa321340ac78a42ff95}{md\_provsize}}; \textcolor{comment}{/* Provider's size. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00252}\mbox{\hyperlink{structg__eli__metadata_af7456ba38129bdd91fbfac2660374bcc}{00252}}         uint32\_t        \mbox{\hyperlink{structg__eli__metadata_af7456ba38129bdd91fbfac2660374bcc}{md\_sectorsize}};     \textcolor{comment}{/* Sector size. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00253}\mbox{\hyperlink{structg__eli__metadata_a0474a13626f0736ae5406bd253896420}{00253}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structg__eli__metadata_a0474a13626f0736ae5406bd253896420}{md\_keys}}; \textcolor{comment}{/* Available keys. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00254}\mbox{\hyperlink{structg__eli__metadata_ac992d6c682f281f204b4534a13386e7d}{00254}}         int32\_t         \mbox{\hyperlink{structg__eli__metadata_ac992d6c682f281f204b4534a13386e7d}{md\_iterations}};     \textcolor{comment}{/* Number of iterations for PKCS\#5v2. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00255}\mbox{\hyperlink{structg__eli__metadata_a46a833a1c54e2d5919f18351f08e5a32}{00255}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structg__eli__metadata_a46a833a1c54e2d5919f18351f08e5a32}{md\_salt}}[\mbox{\hyperlink{g__eli_8h_a3777eb3a24a80890f3e3a36e8977efca}{G\_ELI\_SALTLEN}}]; \textcolor{comment}{/* Salt. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00256}00256                         \textcolor{comment}{/* Encrypted master key (IV-\/key, Data-\/key, HMAC). */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00257}\mbox{\hyperlink{structg__eli__metadata_a3d2880c6ca44524e58cb63ba479f14e9}{00257}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structg__eli__metadata_a3d2880c6ca44524e58cb63ba479f14e9}{md\_mkeys}}[\mbox{\hyperlink{g__eli_8h_abb1d3eb1d3c15da2395385de4d58cf81}{G\_ELI\_MAXMKEYS}} * \mbox{\hyperlink{g__eli_8h_a91be18a4ef2a9aa3d1373c347cea7edb}{G\_ELI\_MKEYLEN}}];}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00258}\mbox{\hyperlink{structg__eli__metadata_ac9ca477629b4c00997d0a5d0b5ad6a6b}{00258}}         u\_char          \mbox{\hyperlink{structg__eli__metadata_ac9ca477629b4c00997d0a5d0b5ad6a6b}{md\_hash}}[16];     \textcolor{comment}{/* MD5 hash. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00259}\mbox{\hyperlink{g__eli_8h_a9da00a1c85e29640b43e72e814ff687a}{00259}} \} \mbox{\hyperlink{g__eli_8h_a9da00a1c85e29640b43e72e814ff687a}{\_\_packed}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00260}00260 \textcolor{preprocessor}{\#ifndef \_OpenSSL\_}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00261}00261 \textcolor{keyword}{static} \_\_inline \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00262}\mbox{\hyperlink{g__eli_8h_a2df25d4b040ba985af167ebe13961ca2}{00262}} \mbox{\hyperlink{g__eli_8h_a2df25d4b040ba985af167ebe13961ca2}{eli\_metadata\_encode\_v0}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__eli__metadata}{g\_eli\_metadata}} *md, u\_char **datap)}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00263}00263 \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00264}00264         u\_char *p;}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00265}00265 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00266}00266         p = *datap;}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00267}00267         le32enc(p, md-\/>\mbox{\hyperlink{structg__eli__metadata_a49218b2094d04c2b1519ab966462da94}{md\_flags}});       p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_a49218b2094d04c2b1519ab966462da94}{md\_flags}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00268}00268         le16enc(p, md-\/>\mbox{\hyperlink{structg__eli__metadata_ab104ed527e62f73f3d80fba974a38456}{md\_ealgo}});       p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_ab104ed527e62f73f3d80fba974a38456}{md\_ealgo}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00269}00269         le16enc(p, md-\/>\mbox{\hyperlink{structg__eli__metadata_a5527b37bf36a0f83967c9334a6f8b134}{md\_keylen}});     p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_a5527b37bf36a0f83967c9334a6f8b134}{md\_keylen}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00270}00270         le64enc(p, md-\/>\mbox{\hyperlink{structg__eli__metadata_aa0d8828da846afa321340ac78a42ff95}{md\_provsize}}); p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_aa0d8828da846afa321340ac78a42ff95}{md\_provsize}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00271}00271         le32enc(p, md-\/>\mbox{\hyperlink{structg__eli__metadata_af7456ba38129bdd91fbfac2660374bcc}{md\_sectorsize}});     p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_af7456ba38129bdd91fbfac2660374bcc}{md\_sectorsize}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00272}00272         *p = md-\/>\mbox{\hyperlink{structg__eli__metadata_a0474a13626f0736ae5406bd253896420}{md\_keys}};                p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_a0474a13626f0736ae5406bd253896420}{md\_keys}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00273}00273         le32enc(p, md-\/>\mbox{\hyperlink{structg__eli__metadata_ac992d6c682f281f204b4534a13386e7d}{md\_iterations}});     p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_ac992d6c682f281f204b4534a13386e7d}{md\_iterations}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00274}00274         bcopy(md-\/>\mbox{\hyperlink{structg__eli__metadata_a46a833a1c54e2d5919f18351f08e5a32}{md\_salt}}, p, \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_a46a833a1c54e2d5919f18351f08e5a32}{md\_salt}})); p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_a46a833a1c54e2d5919f18351f08e5a32}{md\_salt}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00275}00275         bcopy(md-\/>\mbox{\hyperlink{structg__eli__metadata_a3d2880c6ca44524e58cb63ba479f14e9}{md\_mkeys}}, p, \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_a3d2880c6ca44524e58cb63ba479f14e9}{md\_mkeys}})); p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_a3d2880c6ca44524e58cb63ba479f14e9}{md\_mkeys}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00276}00276         *datap = p;}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00277}00277 \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00278}00278 \textcolor{keyword}{static} \_\_inline \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00279}\mbox{\hyperlink{g__eli_8h_a22d5c56628d7a9173e822aaf3575a6b8}{00279}} \mbox{\hyperlink{g__eli_8h_a22d5c56628d7a9173e822aaf3575a6b8}{eli\_metadata\_encode\_v1v2v3v4v5v6v7}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__eli__metadata}{g\_eli\_metadata}} *md, u\_char **datap)}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00280}00280 \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00281}00281         u\_char *p;}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00282}00282 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00283}00283         p = *datap;}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00284}00284         le32enc(p, md-\/>\mbox{\hyperlink{structg__eli__metadata_a49218b2094d04c2b1519ab966462da94}{md\_flags}});       p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_a49218b2094d04c2b1519ab966462da94}{md\_flags}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00285}00285         le16enc(p, md-\/>\mbox{\hyperlink{structg__eli__metadata_ab104ed527e62f73f3d80fba974a38456}{md\_ealgo}});       p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_ab104ed527e62f73f3d80fba974a38456}{md\_ealgo}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00286}00286         le16enc(p, md-\/>\mbox{\hyperlink{structg__eli__metadata_a5527b37bf36a0f83967c9334a6f8b134}{md\_keylen}});     p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_a5527b37bf36a0f83967c9334a6f8b134}{md\_keylen}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00287}00287         le16enc(p, md-\/>\mbox{\hyperlink{structg__eli__metadata_acc0b001372f5cb147d3c1e6348bd2f0d}{md\_aalgo}});       p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_acc0b001372f5cb147d3c1e6348bd2f0d}{md\_aalgo}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00288}00288         le64enc(p, md-\/>\mbox{\hyperlink{structg__eli__metadata_aa0d8828da846afa321340ac78a42ff95}{md\_provsize}}); p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_aa0d8828da846afa321340ac78a42ff95}{md\_provsize}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00289}00289         le32enc(p, md-\/>\mbox{\hyperlink{structg__eli__metadata_af7456ba38129bdd91fbfac2660374bcc}{md\_sectorsize}});     p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_af7456ba38129bdd91fbfac2660374bcc}{md\_sectorsize}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00290}00290         *p = md-\/>\mbox{\hyperlink{structg__eli__metadata_a0474a13626f0736ae5406bd253896420}{md\_keys}};                p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_a0474a13626f0736ae5406bd253896420}{md\_keys}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00291}00291         le32enc(p, md-\/>\mbox{\hyperlink{structg__eli__metadata_ac992d6c682f281f204b4534a13386e7d}{md\_iterations}});     p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_ac992d6c682f281f204b4534a13386e7d}{md\_iterations}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00292}00292         bcopy(md-\/>\mbox{\hyperlink{structg__eli__metadata_a46a833a1c54e2d5919f18351f08e5a32}{md\_salt}}, p, \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_a46a833a1c54e2d5919f18351f08e5a32}{md\_salt}})); p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_a46a833a1c54e2d5919f18351f08e5a32}{md\_salt}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00293}00293         bcopy(md-\/>\mbox{\hyperlink{structg__eli__metadata_a3d2880c6ca44524e58cb63ba479f14e9}{md\_mkeys}}, p, \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_a3d2880c6ca44524e58cb63ba479f14e9}{md\_mkeys}})); p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_a3d2880c6ca44524e58cb63ba479f14e9}{md\_mkeys}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00294}00294         *datap = p;}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00295}00295 \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00296}00296 \textcolor{keyword}{static} \_\_inline \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00297}\mbox{\hyperlink{g__eli_8h_a131c7bef39674fc3a49f19b047cd15d2}{00297}} \mbox{\hyperlink{g__eli_8h_a131c7bef39674fc3a49f19b047cd15d2}{eli\_metadata\_encode}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__eli__metadata}{g\_eli\_metadata}} *md, u\_char *\mbox{\hyperlink{g__part__if_8m_a735984d41155bc1032e09bece8f8d66d}{data}})}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00298}00298 \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00299}00299         uint32\_t hash[4];}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00300}00300         MD5\_CTX ctx;}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00301}00301         u\_char *p;}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00302}00302 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00303}00303         p = \mbox{\hyperlink{g__part__if_8m_a735984d41155bc1032e09bece8f8d66d}{data}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00304}00304         bcopy(md-\/>\mbox{\hyperlink{structg__eli__metadata_aeb6a39d396a7deb9d8b3270313d9dd4f}{md\_magic}}, p, \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_aeb6a39d396a7deb9d8b3270313d9dd4f}{md\_magic}}));}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00305}00305         p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_aeb6a39d396a7deb9d8b3270313d9dd4f}{md\_magic}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00306}00306         le32enc(p, md-\/>\mbox{\hyperlink{structg__eli__metadata_ab2df4c07f7d136cfd6d962af2442f833}{md\_version}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00307}00307         p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_ab2df4c07f7d136cfd6d962af2442f833}{md\_version}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00308}00308         \textcolor{keywordflow}{switch} (md-\/>\mbox{\hyperlink{structg__eli__metadata_ab2df4c07f7d136cfd6d962af2442f833}{md\_version}}) \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00309}00309         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__eli_8h_a89335e04094479ba6c5aac39071bca9c}{G\_ELI\_VERSION\_00}}:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00310}00310                 \mbox{\hyperlink{g__eli_8h_a2df25d4b040ba985af167ebe13961ca2}{eli\_metadata\_encode\_v0}}(md, \&p);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00311}00311                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00312}00312         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__eli_8h_a784cc440e91cbb28a7305b2eb1cf1349}{G\_ELI\_VERSION\_01}}:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00313}00313         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__eli_8h_ab513e78ad7e5d376c514d66436125d47}{G\_ELI\_VERSION\_02}}:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00314}00314         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__eli_8h_a9abb63927459a095a555549c3ece3f94}{G\_ELI\_VERSION\_03}}:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00315}00315         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__eli_8h_a9137ce1d627b02b66d1d010c45c8ff23}{G\_ELI\_VERSION\_04}}:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00316}00316         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__eli_8h_a66fcd7e171885dc792b053dd6e2d8965}{G\_ELI\_VERSION\_05}}:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00317}00317         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__eli_8h_a5fdab18ff1d1cbd969e6d739b49db736}{G\_ELI\_VERSION\_06}}:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00318}00318         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__eli_8h_a17e89e9812752f25a89e88aeb7c6ec7f}{G\_ELI\_VERSION\_07}}:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00319}00319                 \mbox{\hyperlink{g__eli_8h_a22d5c56628d7a9173e822aaf3575a6b8}{eli\_metadata\_encode\_v1v2v3v4v5v6v7}}(md, \&p);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00320}00320                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00321}00321         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00322}00322 \textcolor{preprocessor}{\#ifdef \_KERNEL}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00323}00323                 panic(\textcolor{stringliteral}{"{}\%s: Unsupported version \%u."{}}, \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00324}00324                     (u\_int)md-\/>\mbox{\hyperlink{structg__eli__metadata_ab2df4c07f7d136cfd6d962af2442f833}{md\_version}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00325}00325 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00326}00326                 assert(!\textcolor{stringliteral}{"{}Unsupported metadata version."{}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00327}00327 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00328}00328         \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00329}00329         MD5Init(\&ctx);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00330}00330         MD5Update(\&ctx, \mbox{\hyperlink{g__part__if_8m_a735984d41155bc1032e09bece8f8d66d}{data}}, p -\/ \mbox{\hyperlink{g__part__if_8m_a735984d41155bc1032e09bece8f8d66d}{data}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00331}00331         MD5Final((\textcolor{keywordtype}{void} *)hash, \&ctx);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00332}00332         bcopy(hash, md-\/>\mbox{\hyperlink{structg__eli__metadata_ac9ca477629b4c00997d0a5d0b5ad6a6b}{md\_hash}}, \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_ac9ca477629b4c00997d0a5d0b5ad6a6b}{md\_hash}}));}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00333}00333         bcopy(md-\/>\mbox{\hyperlink{structg__eli__metadata_ac9ca477629b4c00997d0a5d0b5ad6a6b}{md\_hash}}, p, \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_ac9ca477629b4c00997d0a5d0b5ad6a6b}{md\_hash}}));}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00334}00334 \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00335}00335 \textcolor{keyword}{static} \_\_inline \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00336}\mbox{\hyperlink{g__eli_8h_a12731624914a24afba78fd2505b7d4db}{00336}} \mbox{\hyperlink{g__eli_8h_a12731624914a24afba78fd2505b7d4db}{eli\_metadata\_decode\_v0}}(\textcolor{keyword}{const} u\_char *\mbox{\hyperlink{g__part__if_8m_a735984d41155bc1032e09bece8f8d66d}{data}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__eli__metadata}{g\_eli\_metadata}} *md)}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00337}00337 \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00338}00338         uint32\_t hash[4];}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00339}00339         MD5\_CTX ctx;}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00340}00340         \textcolor{keyword}{const} u\_char *p;}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00341}00341 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00342}00342         p = \mbox{\hyperlink{g__part__if_8m_a735984d41155bc1032e09bece8f8d66d}{data}} + \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_aeb6a39d396a7deb9d8b3270313d9dd4f}{md\_magic}}) + \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_ab2df4c07f7d136cfd6d962af2442f833}{md\_version}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00343}00343         md-\/>\mbox{\hyperlink{structg__eli__metadata_a49218b2094d04c2b1519ab966462da94}{md\_flags}} = le32dec(p);      p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_a49218b2094d04c2b1519ab966462da94}{md\_flags}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00344}00344         md-\/>\mbox{\hyperlink{structg__eli__metadata_ab104ed527e62f73f3d80fba974a38456}{md\_ealgo}} = le16dec(p);      p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_ab104ed527e62f73f3d80fba974a38456}{md\_ealgo}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00345}00345         md-\/>\mbox{\hyperlink{structg__eli__metadata_a5527b37bf36a0f83967c9334a6f8b134}{md\_keylen}} = le16dec(p);    p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_a5527b37bf36a0f83967c9334a6f8b134}{md\_keylen}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00346}00346         md-\/>\mbox{\hyperlink{structg__eli__metadata_aa0d8828da846afa321340ac78a42ff95}{md\_provsize}} = le64dec(p);        p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_aa0d8828da846afa321340ac78a42ff95}{md\_provsize}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00347}00347         md-\/>\mbox{\hyperlink{structg__eli__metadata_af7456ba38129bdd91fbfac2660374bcc}{md\_sectorsize}} = le32dec(p);    p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_af7456ba38129bdd91fbfac2660374bcc}{md\_sectorsize}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00348}00348         md-\/>\mbox{\hyperlink{structg__eli__metadata_a0474a13626f0736ae5406bd253896420}{md\_keys}} = *p;                p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_a0474a13626f0736ae5406bd253896420}{md\_keys}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00349}00349         md-\/>\mbox{\hyperlink{structg__eli__metadata_ac992d6c682f281f204b4534a13386e7d}{md\_iterations}} = le32dec(p);    p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_ac992d6c682f281f204b4534a13386e7d}{md\_iterations}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00350}00350         bcopy(p, md-\/>\mbox{\hyperlink{structg__eli__metadata_a46a833a1c54e2d5919f18351f08e5a32}{md\_salt}}, \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_a46a833a1c54e2d5919f18351f08e5a32}{md\_salt}})); p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_a46a833a1c54e2d5919f18351f08e5a32}{md\_salt}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00351}00351         bcopy(p, md-\/>\mbox{\hyperlink{structg__eli__metadata_a3d2880c6ca44524e58cb63ba479f14e9}{md\_mkeys}}, \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_a3d2880c6ca44524e58cb63ba479f14e9}{md\_mkeys}})); p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_a3d2880c6ca44524e58cb63ba479f14e9}{md\_mkeys}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00352}00352         MD5Init(\&ctx);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00353}00353         MD5Update(\&ctx, \mbox{\hyperlink{g__part__if_8m_a735984d41155bc1032e09bece8f8d66d}{data}}, p -\/ \mbox{\hyperlink{g__part__if_8m_a735984d41155bc1032e09bece8f8d66d}{data}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00354}00354         MD5Final((\textcolor{keywordtype}{void} *)hash, \&ctx);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00355}00355         bcopy(hash, md-\/>\mbox{\hyperlink{structg__eli__metadata_ac9ca477629b4c00997d0a5d0b5ad6a6b}{md\_hash}}, \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_ac9ca477629b4c00997d0a5d0b5ad6a6b}{md\_hash}}));}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00356}00356         \textcolor{keywordflow}{if} (bcmp(md-\/>\mbox{\hyperlink{structg__eli__metadata_ac9ca477629b4c00997d0a5d0b5ad6a6b}{md\_hash}}, p, 16) != 0)}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00357}00357                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00358}00358         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00359}00359 \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00360}00360 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00361}00361 \textcolor{keyword}{static} \_\_inline \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00362}\mbox{\hyperlink{g__eli_8h_a9da12dfb5ecc918b16d7ff9518bcd6f2}{00362}} \mbox{\hyperlink{g__eli_8h_a9da12dfb5ecc918b16d7ff9518bcd6f2}{eli\_metadata\_decode\_v1v2v3v4v5v6v7}}(\textcolor{keyword}{const} u\_char *\mbox{\hyperlink{g__part__if_8m_a735984d41155bc1032e09bece8f8d66d}{data}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__eli__metadata}{g\_eli\_metadata}} *md)}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00363}00363 \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00364}00364         uint32\_t hash[4];}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00365}00365         MD5\_CTX ctx;}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00366}00366         \textcolor{keyword}{const} u\_char *p;}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00367}00367 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00368}00368         p = \mbox{\hyperlink{g__part__if_8m_a735984d41155bc1032e09bece8f8d66d}{data}} + \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_aeb6a39d396a7deb9d8b3270313d9dd4f}{md\_magic}}) + \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_ab2df4c07f7d136cfd6d962af2442f833}{md\_version}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00369}00369         md-\/>\mbox{\hyperlink{structg__eli__metadata_a49218b2094d04c2b1519ab966462da94}{md\_flags}} = le32dec(p);      p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_a49218b2094d04c2b1519ab966462da94}{md\_flags}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00370}00370         md-\/>\mbox{\hyperlink{structg__eli__metadata_ab104ed527e62f73f3d80fba974a38456}{md\_ealgo}} = le16dec(p);      p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_ab104ed527e62f73f3d80fba974a38456}{md\_ealgo}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00371}00371         md-\/>\mbox{\hyperlink{structg__eli__metadata_a5527b37bf36a0f83967c9334a6f8b134}{md\_keylen}} = le16dec(p);    p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_a5527b37bf36a0f83967c9334a6f8b134}{md\_keylen}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00372}00372         md-\/>\mbox{\hyperlink{structg__eli__metadata_acc0b001372f5cb147d3c1e6348bd2f0d}{md\_aalgo}} = le16dec(p);      p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_acc0b001372f5cb147d3c1e6348bd2f0d}{md\_aalgo}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00373}00373         md-\/>\mbox{\hyperlink{structg__eli__metadata_aa0d8828da846afa321340ac78a42ff95}{md\_provsize}} = le64dec(p);        p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_aa0d8828da846afa321340ac78a42ff95}{md\_provsize}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00374}00374         md-\/>\mbox{\hyperlink{structg__eli__metadata_af7456ba38129bdd91fbfac2660374bcc}{md\_sectorsize}} = le32dec(p);    p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_af7456ba38129bdd91fbfac2660374bcc}{md\_sectorsize}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00375}00375         md-\/>\mbox{\hyperlink{structg__eli__metadata_a0474a13626f0736ae5406bd253896420}{md\_keys}} = *p;                p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_a0474a13626f0736ae5406bd253896420}{md\_keys}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00376}00376         md-\/>\mbox{\hyperlink{structg__eli__metadata_ac992d6c682f281f204b4534a13386e7d}{md\_iterations}} = le32dec(p);    p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_ac992d6c682f281f204b4534a13386e7d}{md\_iterations}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00377}00377         bcopy(p, md-\/>\mbox{\hyperlink{structg__eli__metadata_a46a833a1c54e2d5919f18351f08e5a32}{md\_salt}}, \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_a46a833a1c54e2d5919f18351f08e5a32}{md\_salt}})); p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_a46a833a1c54e2d5919f18351f08e5a32}{md\_salt}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00378}00378         bcopy(p, md-\/>\mbox{\hyperlink{structg__eli__metadata_a3d2880c6ca44524e58cb63ba479f14e9}{md\_mkeys}}, \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_a3d2880c6ca44524e58cb63ba479f14e9}{md\_mkeys}})); p += \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_a3d2880c6ca44524e58cb63ba479f14e9}{md\_mkeys}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00379}00379         MD5Init(\&ctx);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00380}00380         MD5Update(\&ctx, \mbox{\hyperlink{g__part__if_8m_a735984d41155bc1032e09bece8f8d66d}{data}}, p -\/ \mbox{\hyperlink{g__part__if_8m_a735984d41155bc1032e09bece8f8d66d}{data}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00381}00381         MD5Final((\textcolor{keywordtype}{void} *)hash, \&ctx);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00382}00382         bcopy(hash, md-\/>\mbox{\hyperlink{structg__eli__metadata_ac9ca477629b4c00997d0a5d0b5ad6a6b}{md\_hash}}, \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_ac9ca477629b4c00997d0a5d0b5ad6a6b}{md\_hash}}));}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00383}00383         \textcolor{keywordflow}{if} (bcmp(md-\/>\mbox{\hyperlink{structg__eli__metadata_ac9ca477629b4c00997d0a5d0b5ad6a6b}{md\_hash}}, p, 16) != 0)}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00384}00384                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00385}00385         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00386}00386 \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00387}00387 \textcolor{keyword}{static} \_\_inline \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00388}\mbox{\hyperlink{g__eli_8h_a65a1a78979f9b39d94bfc457f7b41040}{00388}} \mbox{\hyperlink{g__eli_8h_a65a1a78979f9b39d94bfc457f7b41040}{eli\_metadata\_decode}}(\textcolor{keyword}{const} u\_char *\mbox{\hyperlink{g__part__if_8m_a735984d41155bc1032e09bece8f8d66d}{data}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__eli__metadata}{g\_eli\_metadata}} *md)}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00389}00389 \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00390}00390         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00391}00391 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00392}00392         bcopy(\mbox{\hyperlink{g__part__if_8m_a735984d41155bc1032e09bece8f8d66d}{data}}, md-\/>\mbox{\hyperlink{structg__eli__metadata_aeb6a39d396a7deb9d8b3270313d9dd4f}{md\_magic}}, \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_aeb6a39d396a7deb9d8b3270313d9dd4f}{md\_magic}}));}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00393}00393         \textcolor{keywordflow}{if} (strcmp(md-\/>\mbox{\hyperlink{structg__eli__metadata_aeb6a39d396a7deb9d8b3270313d9dd4f}{md\_magic}}, \mbox{\hyperlink{g__eli_8h_a46bf6203c4467768cb63cbb6117b4294}{G\_ELI\_MAGIC}}) != 0)}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00394}00394                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00395}00395         md-\/>\mbox{\hyperlink{structg__eli__metadata_ab2df4c07f7d136cfd6d962af2442f833}{md\_version}} = le32dec(\mbox{\hyperlink{g__part__if_8m_a735984d41155bc1032e09bece8f8d66d}{data}} + \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_aeb6a39d396a7deb9d8b3270313d9dd4f}{md\_magic}}));}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00396}00396         \textcolor{keywordflow}{switch} (md-\/>\mbox{\hyperlink{structg__eli__metadata_ab2df4c07f7d136cfd6d962af2442f833}{md\_version}}) \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00397}00397         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__eli_8h_a89335e04094479ba6c5aac39071bca9c}{G\_ELI\_VERSION\_00}}:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00398}00398                 error = \mbox{\hyperlink{g__eli_8h_a12731624914a24afba78fd2505b7d4db}{eli\_metadata\_decode\_v0}}(\mbox{\hyperlink{g__part__if_8m_a735984d41155bc1032e09bece8f8d66d}{data}}, md);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00399}00399                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00400}00400         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__eli_8h_a784cc440e91cbb28a7305b2eb1cf1349}{G\_ELI\_VERSION\_01}}:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00401}00401         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__eli_8h_ab513e78ad7e5d376c514d66436125d47}{G\_ELI\_VERSION\_02}}:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00402}00402         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__eli_8h_a9abb63927459a095a555549c3ece3f94}{G\_ELI\_VERSION\_03}}:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00403}00403         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__eli_8h_a9137ce1d627b02b66d1d010c45c8ff23}{G\_ELI\_VERSION\_04}}:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00404}00404         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__eli_8h_a66fcd7e171885dc792b053dd6e2d8965}{G\_ELI\_VERSION\_05}}:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00405}00405         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__eli_8h_a5fdab18ff1d1cbd969e6d739b49db736}{G\_ELI\_VERSION\_06}}:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00406}00406         \textcolor{keywordflow}{case} \mbox{\hyperlink{g__eli_8h_a17e89e9812752f25a89e88aeb7c6ec7f}{G\_ELI\_VERSION\_07}}:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00407}00407                 error = \mbox{\hyperlink{g__eli_8h_a9da12dfb5ecc918b16d7ff9518bcd6f2}{eli\_metadata\_decode\_v1v2v3v4v5v6v7}}(\mbox{\hyperlink{g__part__if_8m_a735984d41155bc1032e09bece8f8d66d}{data}}, md);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00408}00408                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00409}00409         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00410}00410                 error = EOPNOTSUPP;}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00411}00411                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00412}00412         \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00413}00413         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00414}00414 \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00415}00415 \textcolor{preprocessor}{\#endif  }\textcolor{comment}{/* !\_OpenSSL */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00416}00416 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00417}00417 \textcolor{keyword}{static} \_\_inline u\_int}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00418}\mbox{\hyperlink{g__eli_8h_a7e010046e4ee6d68b3b47876506eb27f}{00418}} \mbox{\hyperlink{g__eli_8h_a7e010046e4ee6d68b3b47876506eb27f}{g\_eli\_str2ealgo}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}})}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00419}00419 \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00420}00420 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00421}00421         \textcolor{keywordflow}{if} (strcasecmp(\textcolor{stringliteral}{"{}null"{}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00422}00422                 \textcolor{keywordflow}{return} (CRYPTO\_NULL\_CBC);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00423}00423         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcasecmp(\textcolor{stringliteral}{"{}null-\/cbc"{}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00424}00424                 \textcolor{keywordflow}{return} (CRYPTO\_NULL\_CBC);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00425}00425         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcasecmp(\textcolor{stringliteral}{"{}aes"{}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00426}00426                 \textcolor{keywordflow}{return} (CRYPTO\_AES\_XTS);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00427}00427         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcasecmp(\textcolor{stringliteral}{"{}aes-\/cbc"{}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00428}00428                 \textcolor{keywordflow}{return} (CRYPTO\_AES\_CBC);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00429}00429         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcasecmp(\textcolor{stringliteral}{"{}aes-\/xts"{}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00430}00430                 \textcolor{keywordflow}{return} (CRYPTO\_AES\_XTS);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00431}00431         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcasecmp(\textcolor{stringliteral}{"{}camellia"{}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00432}00432                 \textcolor{keywordflow}{return} (CRYPTO\_CAMELLIA\_CBC);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00433}00433         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcasecmp(\textcolor{stringliteral}{"{}camellia-\/cbc"{}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00434}00434                 \textcolor{keywordflow}{return} (CRYPTO\_CAMELLIA\_CBC);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00435}00435         \textcolor{keywordflow}{return} (CRYPTO\_ALGORITHM\_MIN -\/ 1);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00436}00436 \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00437}00437 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00438}00438 \textcolor{keyword}{static} \_\_inline u\_int}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00439}\mbox{\hyperlink{g__eli_8h_a671c2115f8d34a2795a585d6c1d7ca34}{00439}} \mbox{\hyperlink{g__eli_8h_a671c2115f8d34a2795a585d6c1d7ca34}{g\_eli\_str2aalgo}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}})}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00440}00440 \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00441}00441 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00442}00442         \textcolor{keywordflow}{if} (strcasecmp(\textcolor{stringliteral}{"{}hmac/sha1"{}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00443}00443                 \textcolor{keywordflow}{return} (CRYPTO\_SHA1\_HMAC);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00444}00444         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcasecmp(\textcolor{stringliteral}{"{}hmac/ripemd160"{}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00445}00445                 \textcolor{keywordflow}{return} (CRYPTO\_RIPEMD160\_HMAC);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00446}00446         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcasecmp(\textcolor{stringliteral}{"{}hmac/sha256"{}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00447}00447                 \textcolor{keywordflow}{return} (CRYPTO\_SHA2\_256\_HMAC);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00448}00448         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcasecmp(\textcolor{stringliteral}{"{}hmac/sha384"{}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00449}00449                 \textcolor{keywordflow}{return} (CRYPTO\_SHA2\_384\_HMAC);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00450}00450         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcasecmp(\textcolor{stringliteral}{"{}hmac/sha512"{}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00451}00451                 \textcolor{keywordflow}{return} (CRYPTO\_SHA2\_512\_HMAC);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00452}00452         \textcolor{keywordflow}{return} (CRYPTO\_ALGORITHM\_MIN -\/ 1);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00453}00453 \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00454}00454 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00455}00455 \textcolor{keyword}{static} \_\_inline \textcolor{keyword}{const} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00456}\mbox{\hyperlink{g__eli_8h_a974d1566ac947ba6a0c7dea7902910dc}{00456}} \mbox{\hyperlink{g__eli_8h_a974d1566ac947ba6a0c7dea7902910dc}{g\_eli\_algo2str}}(u\_int algo)}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00457}00457 \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00458}00458 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00459}00459         \textcolor{keywordflow}{switch} (algo) \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00460}00460         \textcolor{keywordflow}{case} CRYPTO\_NULL\_CBC:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00461}00461                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}NULL"{}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00462}00462         \textcolor{keywordflow}{case} CRYPTO\_AES\_CBC:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00463}00463                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}AES-\/CBC"{}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00464}00464         \textcolor{keywordflow}{case} CRYPTO\_AES\_XTS:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00465}00465                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}AES-\/XTS"{}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00466}00466         \textcolor{keywordflow}{case} CRYPTO\_CAMELLIA\_CBC:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00467}00467                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}CAMELLIA-\/CBC"{}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00468}00468         \textcolor{keywordflow}{case} CRYPTO\_SHA1\_HMAC:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00469}00469                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}HMAC/SHA1"{}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00470}00470         \textcolor{keywordflow}{case} CRYPTO\_RIPEMD160\_HMAC:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00471}00471                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}HMAC/RIPEMD160"{}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00472}00472         \textcolor{keywordflow}{case} CRYPTO\_SHA2\_256\_HMAC:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00473}00473                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}HMAC/SHA256"{}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00474}00474         \textcolor{keywordflow}{case} CRYPTO\_SHA2\_384\_HMAC:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00475}00475                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}HMAC/SHA384"{}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00476}00476         \textcolor{keywordflow}{case} CRYPTO\_SHA2\_512\_HMAC:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00477}00477                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}HMAC/SHA512"{}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00478}00478         \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00479}00479         \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}unknown"{}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00480}00480 \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00481}00481 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00482}00482 \textcolor{keyword}{static} \_\_inline \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00483}\mbox{\hyperlink{g__eli_8h_abf34c33754c5d029f3395a3ef332b1a2}{00483}} \mbox{\hyperlink{g__eli_8h_abf34c33754c5d029f3395a3ef332b1a2}{eli\_metadata\_dump}}(\textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structg__eli__metadata}{g\_eli\_metadata}} *md)}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00484}00484 \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00485}00485         \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} hex[] = \textcolor{stringliteral}{"{}0123456789abcdef"{}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00486}00486         \textcolor{keywordtype}{char} str[\textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_a3d2880c6ca44524e58cb63ba479f14e9}{md\_mkeys}}) * 2 + 1];}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00487}00487         u\_int i;}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00488}00488 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00489}00489         printf(\textcolor{stringliteral}{"{}     magic: \%s\(\backslash\)n"{}}, md-\/>\mbox{\hyperlink{structg__eli__metadata_aeb6a39d396a7deb9d8b3270313d9dd4f}{md\_magic}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00490}00490         printf(\textcolor{stringliteral}{"{}   version: \%u\(\backslash\)n"{}}, (u\_int)md-\/>\mbox{\hyperlink{structg__eli__metadata_ab2df4c07f7d136cfd6d962af2442f833}{md\_version}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00491}00491         printf(\textcolor{stringliteral}{"{}     flags: 0x\%x\(\backslash\)n"{}}, (u\_int)md-\/>\mbox{\hyperlink{structg__eli__metadata_a49218b2094d04c2b1519ab966462da94}{md\_flags}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00492}00492         printf(\textcolor{stringliteral}{"{}     ealgo: \%s\(\backslash\)n"{}}, \mbox{\hyperlink{g__eli_8h_a974d1566ac947ba6a0c7dea7902910dc}{g\_eli\_algo2str}}(md-\/>\mbox{\hyperlink{structg__eli__metadata_ab104ed527e62f73f3d80fba974a38456}{md\_ealgo}}));}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00493}00493         printf(\textcolor{stringliteral}{"{}    keylen: \%u\(\backslash\)n"{}}, (u\_int)md-\/>\mbox{\hyperlink{structg__eli__metadata_a5527b37bf36a0f83967c9334a6f8b134}{md\_keylen}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00494}00494         \textcolor{keywordflow}{if} (md-\/>\mbox{\hyperlink{structg__eli__metadata_a49218b2094d04c2b1519ab966462da94}{md\_flags}} \& \mbox{\hyperlink{g__eli_8h_a723b90905e6c7f8485c4723967759d84}{G\_ELI\_FLAG\_AUTH}})}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00495}00495                 printf(\textcolor{stringliteral}{"{}     aalgo: \%s\(\backslash\)n"{}}, \mbox{\hyperlink{g__eli_8h_a974d1566ac947ba6a0c7dea7902910dc}{g\_eli\_algo2str}}(md-\/>\mbox{\hyperlink{structg__eli__metadata_acc0b001372f5cb147d3c1e6348bd2f0d}{md\_aalgo}}));}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00496}00496         printf(\textcolor{stringliteral}{"{}  provsize: \%ju\(\backslash\)n"{}}, (uintmax\_t)md-\/>\mbox{\hyperlink{structg__eli__metadata_aa0d8828da846afa321340ac78a42ff95}{md\_provsize}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00497}00497         printf(\textcolor{stringliteral}{"{}sectorsize: \%u\(\backslash\)n"{}}, (u\_int)md-\/>\mbox{\hyperlink{structg__eli__metadata_af7456ba38129bdd91fbfac2660374bcc}{md\_sectorsize}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00498}00498         printf(\textcolor{stringliteral}{"{}      keys: 0x\%02x\(\backslash\)n"{}}, (u\_int)md-\/>\mbox{\hyperlink{structg__eli__metadata_a0474a13626f0736ae5406bd253896420}{md\_keys}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00499}00499         printf(\textcolor{stringliteral}{"{}iterations: \%d\(\backslash\)n"{}}, (\textcolor{keywordtype}{int})md-\/>\mbox{\hyperlink{structg__eli__metadata_ac992d6c682f281f204b4534a13386e7d}{md\_iterations}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00500}00500         bzero(str, \textcolor{keyword}{sizeof}(str));}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00501}00501         \textcolor{keywordflow}{for} (i = 0; i < \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_a46a833a1c54e2d5919f18351f08e5a32}{md\_salt}}); i++) \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00502}00502                 str[i * 2] = hex[md-\/>\mbox{\hyperlink{structg__eli__metadata_a46a833a1c54e2d5919f18351f08e5a32}{md\_salt}}[i] >> 4];}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00503}00503                 str[i * 2 + 1] = hex[md-\/>\mbox{\hyperlink{structg__eli__metadata_a46a833a1c54e2d5919f18351f08e5a32}{md\_salt}}[i] \& 0x0f];}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00504}00504         \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00505}00505         printf(\textcolor{stringliteral}{"{}      Salt: \%s\(\backslash\)n"{}}, str);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00506}00506         bzero(str, \textcolor{keyword}{sizeof}(str));}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00507}00507         \textcolor{keywordflow}{for} (i = 0; i < \textcolor{keyword}{sizeof}(md-\/>\mbox{\hyperlink{structg__eli__metadata_a3d2880c6ca44524e58cb63ba479f14e9}{md\_mkeys}}); i++) \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00508}00508                 str[i * 2] = hex[md-\/>\mbox{\hyperlink{structg__eli__metadata_a3d2880c6ca44524e58cb63ba479f14e9}{md\_mkeys}}[i] >> 4];}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00509}00509                 str[i * 2 + 1] = hex[md-\/>\mbox{\hyperlink{structg__eli__metadata_a3d2880c6ca44524e58cb63ba479f14e9}{md\_mkeys}}[i] \& 0x0f];}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00510}00510         \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00511}00511         printf(\textcolor{stringliteral}{"{}Master Key: \%s\(\backslash\)n"{}}, str);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00512}00512         bzero(str, \textcolor{keyword}{sizeof}(str));}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00513}00513         \textcolor{keywordflow}{for} (i = 0; i < 16; i++) \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00514}00514                 str[i * 2] = hex[md-\/>\mbox{\hyperlink{structg__eli__metadata_ac9ca477629b4c00997d0a5d0b5ad6a6b}{md\_hash}}[i] >> 4];}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00515}00515                 str[i * 2 + 1] = hex[md-\/>\mbox{\hyperlink{structg__eli__metadata_ac9ca477629b4c00997d0a5d0b5ad6a6b}{md\_hash}}[i] \& 0x0f];}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00516}00516         \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00517}00517         printf(\textcolor{stringliteral}{"{}  MD5 hash: \%s\(\backslash\)n"{}}, str);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00518}00518 \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00519}00519 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00520}00520 \textcolor{preprocessor}{\#ifdef \_KERNEL}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00521}00521 \textcolor{keyword}{static} \_\_inline \textcolor{keywordtype}{bool}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00522}\mbox{\hyperlink{g__eli_8h_a04078e89be31a3b62959a18de699447c}{00522}} \mbox{\hyperlink{g__eli_8h_a04078e89be31a3b62959a18de699447c}{eli\_metadata\_crypto\_supported}}(\textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structg__eli__metadata}{g\_eli\_metadata}} *md)}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00523}00523 \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00524}00524 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00525}00525         \textcolor{keywordflow}{switch} (md-\/>\mbox{\hyperlink{structg__eli__metadata_ab104ed527e62f73f3d80fba974a38456}{md\_ealgo}}) \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00526}00526         \textcolor{keywordflow}{case} CRYPTO\_NULL\_CBC:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00527}00527         \textcolor{keywordflow}{case} CRYPTO\_AES\_CBC:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00528}00528         \textcolor{keywordflow}{case} CRYPTO\_CAMELLIA\_CBC:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00529}00529         \textcolor{keywordflow}{case} CRYPTO\_AES\_XTS:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00530}00530                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00531}00531         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00532}00532                 \textcolor{keywordflow}{return} (\textcolor{keyword}{false});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00533}00533         \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00534}00534         \textcolor{keywordflow}{if} (md-\/>\mbox{\hyperlink{structg__eli__metadata_a49218b2094d04c2b1519ab966462da94}{md\_flags}} \& \mbox{\hyperlink{g__eli_8h_a723b90905e6c7f8485c4723967759d84}{G\_ELI\_FLAG\_AUTH}}) \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00535}00535                 \textcolor{keywordflow}{switch} (md-\/>\mbox{\hyperlink{structg__eli__metadata_acc0b001372f5cb147d3c1e6348bd2f0d}{md\_aalgo}}) \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00536}00536                 \textcolor{keywordflow}{case} CRYPTO\_SHA1\_HMAC:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00537}00537                 \textcolor{keywordflow}{case} CRYPTO\_RIPEMD160\_HMAC:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00538}00538                 \textcolor{keywordflow}{case} CRYPTO\_SHA2\_256\_HMAC:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00539}00539                 \textcolor{keywordflow}{case} CRYPTO\_SHA2\_384\_HMAC:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00540}00540                 \textcolor{keywordflow}{case} CRYPTO\_SHA2\_512\_HMAC:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00541}00541                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00542}00542                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00543}00543                         \textcolor{keywordflow}{return} (\textcolor{keyword}{false});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00544}00544                 \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00545}00545         \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00546}00546         \textcolor{keywordflow}{return} (\textcolor{keyword}{true});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00547}00547 \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00548}00548 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00549}00549 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00550}00550 \textcolor{keyword}{static} \_\_inline u\_int}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00551}\mbox{\hyperlink{g__eli_8h_a097f3b30cebdcf99f7423ed4a0a8c8d9}{00551}} \mbox{\hyperlink{g__eli_8h_a097f3b30cebdcf99f7423ed4a0a8c8d9}{g\_eli\_keylen}}(u\_int algo, u\_int keylen)}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00552}00552 \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00553}00553 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00554}00554         \textcolor{keywordflow}{switch} (algo) \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00555}00555         \textcolor{keywordflow}{case} CRYPTO\_NULL\_CBC:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00556}00556                 \textcolor{keywordflow}{if} (keylen == 0)}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00557}00557                         keylen = 64 * 8;}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00558}00558                 \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00559}00559                         \textcolor{keywordflow}{if} (keylen > 64 * 8)}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00560}00560                                 keylen = 0;}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00561}00561                 \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00562}00562                 \textcolor{keywordflow}{return} (keylen);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00563}00563         \textcolor{keywordflow}{case} CRYPTO\_AES\_CBC:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00564}00564         \textcolor{keywordflow}{case} CRYPTO\_CAMELLIA\_CBC:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00565}00565                 \textcolor{keywordflow}{switch} (keylen) \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00566}00566                 \textcolor{keywordflow}{case} 0:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00567}00567                         \textcolor{keywordflow}{return} (128);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00568}00568                 \textcolor{keywordflow}{case} 128:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00569}00569                 \textcolor{keywordflow}{case} 192:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00570}00570                 \textcolor{keywordflow}{case} 256:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00571}00571                         \textcolor{keywordflow}{return} (keylen);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00572}00572                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00573}00573                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00574}00574                 \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00575}00575         \textcolor{keywordflow}{case} CRYPTO\_AES\_XTS:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00576}00576                 \textcolor{keywordflow}{switch} (keylen) \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00577}00577                 \textcolor{keywordflow}{case} 0:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00578}00578                         \textcolor{keywordflow}{return} (128);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00579}00579                 \textcolor{keywordflow}{case} 128:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00580}00580                 \textcolor{keywordflow}{case} 256:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00581}00581                         \textcolor{keywordflow}{return} (keylen);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00582}00582                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00583}00583                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00584}00584                 \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00585}00585         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00586}00586                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00587}00587         \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00588}00588 \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00589}00589 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00590}00590 \textcolor{keyword}{static} \_\_inline u\_int}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00591}\mbox{\hyperlink{g__eli_8h_a9759c32a5d088af02c42c2acf1513ee9}{00591}} \mbox{\hyperlink{g__eli_8h_a9759c32a5d088af02c42c2acf1513ee9}{g\_eli\_ivlen}}(u\_int algo)}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00592}00592 \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00593}00593 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00594}00594         \textcolor{keywordflow}{switch} (algo) \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00595}00595         \textcolor{keywordflow}{case} CRYPTO\_AES\_XTS:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00596}00596                 \textcolor{keywordflow}{return} (AES\_XTS\_IV\_LEN);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00597}00597         \textcolor{keywordflow}{case} CRYPTO\_AES\_CBC:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00598}00598                 \textcolor{keywordflow}{return} (AES\_BLOCK\_LEN);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00599}00599         \textcolor{keywordflow}{case} CRYPTO\_CAMELLIA\_CBC:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00600}00600                 \textcolor{keywordflow}{return} (CAMELLIA\_BLOCK\_LEN);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00601}00601         \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00602}00602         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00603}00603 \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00604}00604 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00605}00605 \textcolor{keyword}{static} \_\_inline u\_int}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00606}\mbox{\hyperlink{g__eli_8h_a7ac659b8023acabd6f19340d6a7a0ce9}{00606}} \mbox{\hyperlink{g__eli_8h_a7ac659b8023acabd6f19340d6a7a0ce9}{g\_eli\_hashlen}}(u\_int algo)}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00607}00607 \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00608}00608 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00609}00609         \textcolor{keywordflow}{switch} (algo) \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00610}00610         \textcolor{keywordflow}{case} CRYPTO\_SHA1\_HMAC:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00611}00611                 \textcolor{keywordflow}{return} (20);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00612}00612         \textcolor{keywordflow}{case} CRYPTO\_RIPEMD160\_HMAC:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00613}00613                 \textcolor{keywordflow}{return} (20);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00614}00614         \textcolor{keywordflow}{case} CRYPTO\_SHA2\_256\_HMAC:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00615}00615                 \textcolor{keywordflow}{return} (32);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00616}00616         \textcolor{keywordflow}{case} CRYPTO\_SHA2\_384\_HMAC:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00617}00617                 \textcolor{keywordflow}{return} (48);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00618}00618         \textcolor{keywordflow}{case} CRYPTO\_SHA2\_512\_HMAC:}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00619}00619                 \textcolor{keywordflow}{return} (64);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00620}00620         \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00621}00621         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00622}00622 \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00623}00623 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00624}00624 \textcolor{keyword}{static} \_\_inline off\_t}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00625}\mbox{\hyperlink{g__eli_8h_a6d0ef350be3810ef0a83df0f6d8d1bd1}{00625}} \mbox{\hyperlink{g__eli_8h_a6d0ef350be3810ef0a83df0f6d8d1bd1}{eli\_mediasize}}(\textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structg__eli__softc}{g\_eli\_softc}} *sc, off\_t mediasize, u\_int sectorsize)}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00626}00626 \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00627}00627 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00628}00628         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} \& \mbox{\hyperlink{g__eli_8h_a50453da3fa0881f2a73d51ec9205d2be}{G\_ELI\_FLAG\_ONETIME}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00629}00629                 mediasize -\/= sectorsize;}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00630}00630         \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00631}00631         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} \& \mbox{\hyperlink{g__eli_8h_a723b90905e6c7f8485c4723967759d84}{G\_ELI\_FLAG\_AUTH}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00632}00632                 mediasize -\/= (mediasize \% sc-\/>\mbox{\hyperlink{structg__eli__softc_a98f6d4510dc5541540fbb45883782c9f}{sc\_sectorsize}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00633}00633         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00634}00634                 mediasize /= sc-\/>\mbox{\hyperlink{structg__eli__softc_a6212e3d8c829bd8dd2bbd1d371b910e0}{sc\_bytes\_per\_sector}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00635}00635                 mediasize *= sc-\/>\mbox{\hyperlink{structg__eli__softc_a98f6d4510dc5541540fbb45883782c9f}{sc\_sectorsize}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00636}00636         \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00637}00637 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00638}00638         \textcolor{keywordflow}{return} (mediasize);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00639}00639 \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00640}00640 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00641}00641 \textcolor{keyword}{static} \_\_inline \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00642}\mbox{\hyperlink{g__eli_8h_a21c35e0df128ff0e7cbe56382b915062}{00642}} \mbox{\hyperlink{g__eli_8h_a21c35e0df128ff0e7cbe56382b915062}{eli\_metadata\_softc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__eli__softc}{g\_eli\_softc}} *sc, \textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structg__eli__metadata}{g\_eli\_metadata}} *md,}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00643}00643     u\_int sectorsize, off\_t mediasize)}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00644}00644 \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00645}00645 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00646}00646         sc-\/>\mbox{\hyperlink{structg__eli__softc_af941b225252f65e38a1ea020ce4eb35d}{sc\_version}} = md-\/>\mbox{\hyperlink{structg__eli__metadata_ab2df4c07f7d136cfd6d962af2442f833}{md\_version}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00647}00647         sc-\/>\mbox{\hyperlink{structg__eli__softc_a239cdf3f405f19bdfe897bd9d1de8a37}{sc\_inflight}} = 0;}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00648}00648         sc-\/>\mbox{\hyperlink{structg__eli__softc_a7a47e0297c054c5f2ff0c9b02bf00011}{sc\_crypto}} = \mbox{\hyperlink{g__eli_8h_a124c07ee05e88fde379ea25ed1fa708a}{G\_ELI\_CRYPTO\_UNKNOWN}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00649}00649         sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} = md-\/>\mbox{\hyperlink{structg__eli__metadata_a49218b2094d04c2b1519ab966462da94}{md\_flags}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00650}00650         \textcolor{comment}{/* Backward compatibility. */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00651}00651         \textcolor{keywordflow}{if} (md-\/>\mbox{\hyperlink{structg__eli__metadata_ab2df4c07f7d136cfd6d962af2442f833}{md\_version}} < \mbox{\hyperlink{g__eli_8h_a9137ce1d627b02b66d1d010c45c8ff23}{G\_ELI\_VERSION\_04}})}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00652}00652                 sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} |= \mbox{\hyperlink{g__eli_8h_aadf5b5c7223ca0c58183c6b87de8acd0}{G\_ELI\_FLAG\_NATIVE\_BYTE\_ORDER}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00653}00653         \textcolor{keywordflow}{if} (md-\/>\mbox{\hyperlink{structg__eli__metadata_ab2df4c07f7d136cfd6d962af2442f833}{md\_version}} < \mbox{\hyperlink{g__eli_8h_a66fcd7e171885dc792b053dd6e2d8965}{G\_ELI\_VERSION\_05}})}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00654}00654                 sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} |= \mbox{\hyperlink{g__eli_8h_a0440d24008eaa5fe7620843804fecc7a}{G\_ELI\_FLAG\_SINGLE\_KEY}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00655}00655         \textcolor{keywordflow}{if} (md-\/>\mbox{\hyperlink{structg__eli__metadata_ab2df4c07f7d136cfd6d962af2442f833}{md\_version}} < \mbox{\hyperlink{g__eli_8h_a5fdab18ff1d1cbd969e6d739b49db736}{G\_ELI\_VERSION\_06}} \&\&}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00656}00656             (sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} \& \mbox{\hyperlink{g__eli_8h_a723b90905e6c7f8485c4723967759d84}{G\_ELI\_FLAG\_AUTH}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00657}00657                 sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} |= \mbox{\hyperlink{g__eli_8h_acafc9dd961af3f154c01c7dbc38fea0d}{G\_ELI\_FLAG\_FIRST\_KEY}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00658}00658         \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00659}00659         \textcolor{keywordflow}{if} (md-\/>\mbox{\hyperlink{structg__eli__metadata_ab2df4c07f7d136cfd6d962af2442f833}{md\_version}} < \mbox{\hyperlink{g__eli_8h_a17e89e9812752f25a89e88aeb7c6ec7f}{G\_ELI\_VERSION\_07}})}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00660}00660                 sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} |= \mbox{\hyperlink{g__eli_8h_adb32d9869b3bb0f00fa1cc7bb85990b1}{G\_ELI\_FLAG\_ENC\_IVKEY}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00661}00661         sc-\/>\mbox{\hyperlink{structg__eli__softc_aecc6e7e7b1b2e05b9ded85a9ab763d74}{sc\_ealgo}} = md-\/>\mbox{\hyperlink{structg__eli__metadata_ab104ed527e62f73f3d80fba974a38456}{md\_ealgo}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00662}00662 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00663}00663         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} \& \mbox{\hyperlink{g__eli_8h_a723b90905e6c7f8485c4723967759d84}{G\_ELI\_FLAG\_AUTH}}) \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00664}00664                 sc-\/>\mbox{\hyperlink{structg__eli__softc_ade183f81eb3c9912f067501f944aa10a}{sc\_akeylen}} = \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structg__eli__softc_a01aee1422eec5048a657dfab2a70518f}{sc\_akey}}) * 8;}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00665}00665                 sc-\/>\mbox{\hyperlink{structg__eli__softc_a03838413934611b56f3e955c600d28c7}{sc\_aalgo}} = md-\/>\mbox{\hyperlink{structg__eli__metadata_acc0b001372f5cb147d3c1e6348bd2f0d}{md\_aalgo}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00666}00666                 sc-\/>\mbox{\hyperlink{structg__eli__softc_a50a1a9f02bbadd3471006e5dfc65ac8a}{sc\_alen}} = \mbox{\hyperlink{g__eli_8h_a7ac659b8023acabd6f19340d6a7a0ce9}{g\_eli\_hashlen}}(sc-\/>\mbox{\hyperlink{structg__eli__softc_a03838413934611b56f3e955c600d28c7}{sc\_aalgo}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00667}00667 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00668}00668                 sc-\/>\mbox{\hyperlink{structg__eli__softc_a7096457a870bb699d5cd9d3beb0313e7}{sc\_data\_per\_sector}} = sectorsize -\/ sc-\/>\mbox{\hyperlink{structg__eli__softc_a50a1a9f02bbadd3471006e5dfc65ac8a}{sc\_alen}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00669}00669                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00670}00670 \textcolor{comment}{                 * Some hash functions (like SHA1 and RIPEMD160) generates hash}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00671}00671 \textcolor{comment}{                 * which length is not multiple of 128 bits, but we want data}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00672}00672 \textcolor{comment}{                 * length to be multiple of 128, so we can encrypt without}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00673}00673 \textcolor{comment}{                 * padding. The line below rounds down data length to multiple}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00674}00674 \textcolor{comment}{                 * of 128 bits.}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00675}00675 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00676}00676                 sc-\/>\mbox{\hyperlink{structg__eli__softc_a7096457a870bb699d5cd9d3beb0313e7}{sc\_data\_per\_sector}} -\/= sc-\/>\mbox{\hyperlink{structg__eli__softc_a7096457a870bb699d5cd9d3beb0313e7}{sc\_data\_per\_sector}} \% 16;}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00677}00677 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00678}00678                 sc-\/>\mbox{\hyperlink{structg__eli__softc_a6212e3d8c829bd8dd2bbd1d371b910e0}{sc\_bytes\_per\_sector}} =}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00679}00679                     (md-\/>\mbox{\hyperlink{structg__eli__metadata_af7456ba38129bdd91fbfac2660374bcc}{md\_sectorsize}} -\/ 1) / sc-\/>\mbox{\hyperlink{structg__eli__softc_a7096457a870bb699d5cd9d3beb0313e7}{sc\_data\_per\_sector}} + 1;}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00680}00680                 sc-\/>\mbox{\hyperlink{structg__eli__softc_a6212e3d8c829bd8dd2bbd1d371b910e0}{sc\_bytes\_per\_sector}} *= sectorsize;}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00681}00681         \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00682}00682         sc-\/>\mbox{\hyperlink{structg__eli__softc_ade1e394db940df80bb59ab74c0df8bc4}{sc\_provsize}} = mediasize;}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00683}00683         sc-\/>\mbox{\hyperlink{structg__eli__softc_a98f6d4510dc5541540fbb45883782c9f}{sc\_sectorsize}} = md-\/>\mbox{\hyperlink{structg__eli__metadata_af7456ba38129bdd91fbfac2660374bcc}{md\_sectorsize}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00684}00684         sc-\/>\mbox{\hyperlink{structg__eli__softc_a886bea13cc2ca3e3e7b459d97d2459f5}{sc\_mediasize}} = \mbox{\hyperlink{g__eli_8h_a6d0ef350be3810ef0a83df0f6d8d1bd1}{eli\_mediasize}}(sc, mediasize, sectorsize);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00685}00685         sc-\/>\mbox{\hyperlink{structg__eli__softc_a67c3362eed360679f3c4b8a9408dd736}{sc\_ekeylen}} = md-\/>\mbox{\hyperlink{structg__eli__metadata_a5527b37bf36a0f83967c9334a6f8b134}{md\_keylen}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00686}00686 \}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00687}00687 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00688}00688 \textcolor{preprocessor}{\#ifdef \_KERNEL}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00689}00689 \textcolor{keywordtype}{int} \mbox{\hyperlink{g__eli_8h_a73b39d79b3db8b9eb1a3164c7f522c8c}{g\_eli\_read\_metadata}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}},}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00690}00690     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__eli__metadata}{g\_eli\_metadata}} *md);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00691}00691 \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__eli_8h_a7f89deff3fb496d7302dc96b05f5cee2}{g\_eli\_create}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}},}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00692}00692     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__provider}{g\_provider}} *bpp, \textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structg__eli__metadata}{g\_eli\_metadata}} *md,}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00693}00693     \textcolor{keyword}{const} u\_char *mkey, \textcolor{keywordtype}{int} nkey);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00694}00694 \textcolor{keywordtype}{int} \mbox{\hyperlink{g__eli_8h_a065e40173aeaf62cd0dad0d2b7a71e04}{g\_eli\_destroy}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__eli__softc}{g\_eli\_softc}} *sc, boolean\_t force);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00695}00695 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00696}00696 \textcolor{keywordtype}{int} \mbox{\hyperlink{g__eli_8h_a457eedfe113d30b828b13ee6b608642c}{g\_eli\_access}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, \textcolor{keywordtype}{int} dr, \textcolor{keywordtype}{int} dw, \textcolor{keywordtype}{int} de);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00697}00697 \textcolor{keywordtype}{void} \mbox{\hyperlink{g__eli_8h_afe73ab3c1b97b746683f8a5e6292c147}{g\_eli\_config}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *verb);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00698}00698 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00699}00699 \textcolor{keywordtype}{void} \mbox{\hyperlink{g__eli_8h_a9ee20b44afe1f7147fddfa6ea9725efd}{g\_eli\_read\_done}}(\textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00700}00700 \textcolor{keywordtype}{void} \mbox{\hyperlink{g__eli_8h_a8eded9348395aad2b5271730e10bbff1}{g\_eli\_write\_done}}(\textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00701}00701 \textcolor{keywordtype}{int} \mbox{\hyperlink{g__eli_8h_a579b00aa63d80fcd91e1b8da3e8e5515}{g\_eli\_crypto\_rerun}}(\textcolor{keyword}{struct} cryptop *crp);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00702}00702 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00703}00703 \textcolor{keywordtype}{bool} \mbox{\hyperlink{g__eli_8h_ab1b19822f161973052c0245e98781fbb}{g\_eli\_alloc\_data}}(\textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \textcolor{keywordtype}{int} sz);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00704}00704 \textcolor{keywordtype}{void} \mbox{\hyperlink{g__eli_8h_a85cfec789b20d2d3959b02285e818978}{g\_eli\_free\_data}}(\textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00705}00705 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00706}00706 \textcolor{keywordtype}{void} \mbox{\hyperlink{g__eli_8h_a1123e9dfa9a2097f498b75477f1af88c}{g\_eli\_crypto\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__eli__softc}{g\_eli\_softc}} *sc, \textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, boolean\_t fromworker);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00707}00707 \textcolor{keywordtype}{void} \mbox{\hyperlink{g__eli_8h_aac374e76e8e4f30d0e3db0cadddb15cb}{g\_eli\_crypto\_run}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__eli__worker}{g\_eli\_worker}} *wr, \textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00708}00708 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00709}00709 \textcolor{keywordtype}{void} \mbox{\hyperlink{g__eli_8h_a5afa122c0c4d3fec5a83a110edac9549}{g\_eli\_auth\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__eli__softc}{g\_eli\_softc}} *sc, \textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00710}00710 \textcolor{keywordtype}{void} \mbox{\hyperlink{g__eli_8h_abda45f20108a5bfb8a455a52cbd7b10c}{g\_eli\_auth\_run}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__eli__worker}{g\_eli\_worker}} *wr, \textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00711}00711 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00712}00712 \textcolor{keywordtype}{void} \mbox{\hyperlink{g__eli_8h_ab07921ca3b88d093ec9b2b33a0d8d226}{g\_eli\_crypto\_ivgen}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__eli__softc}{g\_eli\_softc}} *sc, off\_t \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}}, u\_char *iv,}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00713}00713     \textcolor{keywordtype}{size\_t} size);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00714}00714 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00715}00715 \textcolor{keywordtype}{void} \mbox{\hyperlink{g__eli_8h_adc97589305a00b0bc3a7df2f43bbf254}{g\_eli\_mkey\_hmac}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *mkey, \textcolor{keyword}{const} \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *key);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00716}00716 \textcolor{keywordtype}{int} \mbox{\hyperlink{g__eli_8h_a1278f6f38744543b6cfe4a205c55e65f}{g\_eli\_mkey\_decrypt}}(\textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structg__eli__metadata}{g\_eli\_metadata}} *md,}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00717}00717     \textcolor{keyword}{const} \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *key, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *mkey, \textcolor{keywordtype}{unsigned} keyp);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00718}00718 \textcolor{keywordtype}{int} \mbox{\hyperlink{g__eli_8h_aca1880f274b4cf6b2627697cd0588b23}{g\_eli\_mkey\_decrypt\_any}}(\textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structg__eli__metadata}{g\_eli\_metadata}} *md,}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00719}00719     \textcolor{keyword}{const} \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *key, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *mkey, \textcolor{keywordtype}{unsigned} *nkeyp);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00720}00720 \textcolor{keywordtype}{int} \mbox{\hyperlink{g__eli_8h_a77b2663c4fbbe75572ef203a27a74781}{g\_eli\_mkey\_encrypt}}(\textcolor{keywordtype}{unsigned} algo, \textcolor{keyword}{const} \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *key, \textcolor{keywordtype}{unsigned} keylen,}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00721}00721     \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *mkey);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00722}00722 \textcolor{preprocessor}{\#ifdef \_KERNEL}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00723}00723 \textcolor{keywordtype}{void} \mbox{\hyperlink{g__eli_8h_a43698d99a6e3a6a86c0531e390dde9a9}{g\_eli\_mkey\_propagate}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__eli__softc}{g\_eli\_softc}} *sc, \textcolor{keyword}{const} \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *mkey);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00724}00724 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00725}00725 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00726}00726 \textcolor{keywordtype}{int} \mbox{\hyperlink{g__eli_8h_a0a83ba2e8138a68f6c6995ea3438adef}{g\_eli\_crypto\_encrypt}}(u\_int algo, u\_char *\mbox{\hyperlink{g__part__if_8m_a735984d41155bc1032e09bece8f8d66d}{data}}, \textcolor{keywordtype}{size\_t} datasize,}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00727}00727     \textcolor{keyword}{const} u\_char *key, \textcolor{keywordtype}{size\_t} keysize);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00728}00728 \textcolor{keywordtype}{int} \mbox{\hyperlink{g__eli_8h_a0c6e44cef259688085effb51bb33d59a}{g\_eli\_crypto\_decrypt}}(u\_int algo, u\_char *\mbox{\hyperlink{g__part__if_8m_a735984d41155bc1032e09bece8f8d66d}{data}}, \textcolor{keywordtype}{size\_t} datasize,}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00729}00729     \textcolor{keyword}{const} u\_char *key, \textcolor{keywordtype}{size\_t} keysize);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00730}00730 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00731}\mbox{\hyperlink{structhmac__ctx}{00731}} \textcolor{keyword}{struct }\mbox{\hyperlink{structhmac__ctx}{hmac\_ctx}} \{}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00732}\mbox{\hyperlink{structhmac__ctx_af09486ab180913e073cc10e4118c0c1d}{00732}}         SHA512\_CTX      \mbox{\hyperlink{structhmac__ctx_af09486ab180913e073cc10e4118c0c1d}{innerctx}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00733}\mbox{\hyperlink{structhmac__ctx_ab766aac4d8826a0d607117e0513ebc4e}{00733}}         SHA512\_CTX      \mbox{\hyperlink{structhmac__ctx_ab766aac4d8826a0d607117e0513ebc4e}{outerctx}};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00734}00734 \};}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00735}00735 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00736}00736 \textcolor{keywordtype}{void} \mbox{\hyperlink{g__eli_8h_a043228f1ea776ea3cb70412a7c5cee76}{g\_eli\_crypto\_hmac\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhmac__ctx}{hmac\_ctx}} *ctx, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *hkey,}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00737}00737     \textcolor{keywordtype}{size\_t} hkeylen);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00738}00738 \textcolor{keywordtype}{void} \mbox{\hyperlink{g__eli_8h_a30bc80ea7c5963579dd5083e15a78176}{g\_eli\_crypto\_hmac\_update}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhmac__ctx}{hmac\_ctx}} *ctx, \textcolor{keyword}{const} \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}} *\mbox{\hyperlink{g__part__if_8m_a735984d41155bc1032e09bece8f8d66d}{data}},}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00739}00739     \textcolor{keywordtype}{size\_t} datasize);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00740}00740 \textcolor{keywordtype}{void} \mbox{\hyperlink{g__eli_8h_abc72d045d3fee2a84c89f1168191207a}{g\_eli\_crypto\_hmac\_final}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhmac__ctx}{hmac\_ctx}} *ctx, \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}} *md, \textcolor{keywordtype}{size\_t} mdsize);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00741}00741 \textcolor{keywordtype}{void} \mbox{\hyperlink{g__eli_8h_a7568712ca711b91d055948e2bed38865}{g\_eli\_crypto\_hmac}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char} *hkey, \textcolor{keywordtype}{size\_t} hkeysize,}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00742}00742     \textcolor{keyword}{const} \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}} *\mbox{\hyperlink{g__part__if_8m_a735984d41155bc1032e09bece8f8d66d}{data}}, \textcolor{keywordtype}{size\_t} datasize, \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}} *md, \textcolor{keywordtype}{size\_t} mdsize);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00743}00743 }
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00744}00744 \textcolor{keywordtype}{void} \mbox{\hyperlink{g__eli_8h_ab71dc07a76bd6365d076e51f1dd36c70}{g\_eli\_key\_fill}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__eli__softc}{g\_eli\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__eli__key}{g\_eli\_key}} *key,}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00745}00745     uint64\_t keyno);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00746}00746 \textcolor{preprocessor}{\#ifdef \_KERNEL}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00747}00747 \textcolor{keywordtype}{void} \mbox{\hyperlink{g__eli_8h_a8b7574ca318f8b8d499f7fcc35468313}{g\_eli\_key\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__eli__softc}{g\_eli\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00748}00748 \textcolor{keywordtype}{void} \mbox{\hyperlink{g__eli_8h_abecc31857c0153fd28236eae25d1e8d7}{g\_eli\_key\_destroy}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__eli__softc}{g\_eli\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00749}00749 \textcolor{keywordtype}{void} \mbox{\hyperlink{g__eli_8h_a7d9df773c5f36c14e39bbd1e30e5dfc5}{g\_eli\_key\_resize}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__eli__softc}{g\_eli\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00750}00750 \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}} *\mbox{\hyperlink{g__eli_8h_a0271575799ad05ec5fb7adc0b414e137}{g\_eli\_key\_hold}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__eli__softc}{g\_eli\_softc}} *sc, off\_t \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}}, \textcolor{keywordtype}{size\_t} blocksize);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00751}00751 \textcolor{keywordtype}{void} \mbox{\hyperlink{g__eli_8h_a6f8aafc6ae8883d71c46a348b8856b28}{g\_eli\_key\_drop}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__eli__softc}{g\_eli\_softc}} *sc, \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}} *rawkey);}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00752}00752 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{g__eli_8h_source_l00753}00753 \textcolor{preprocessor}{\#endif  }\textcolor{comment}{/* !\_G\_ELI\_H\_ */}\textcolor{preprocessor}{}}

\end{DoxyCode}
