\hypertarget{g__bde_8h_source}{}\doxysection{g\+\_\+bde.\+h}
\label{g__bde_8h_source}\index{geom/bde/g\_bde.h@{geom/bde/g\_bde.h}}
\mbox{\hyperlink{g__bde_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2002 Poul-\/Henning Kamp}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00005}00005 \textcolor{comment}{ * Copyright (c) 2002 Networks Associates Technology, Inc.}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00006}00006 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00007}00007 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00008}00008 \textcolor{comment}{ * This software was developed for the FreeBSD Project by Poul-\/Henning Kamp}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00009}00009 \textcolor{comment}{ * and NAI Labs, the Security Research Division of Network Associates, Inc.}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00010}00010 \textcolor{comment}{ * under DARPA/SPAWAR contract N66001-\/01-\/C-\/8035 ("{}CBOSS"{}), as part of the}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00011}00011 \textcolor{comment}{ * DARPA CHATS research program.}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00012}00012 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00013}00013 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00014}00014 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00015}00015 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00016}00016 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00017}00017 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00018}00018 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00019}00019 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00020}00020 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00021}00021 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00022}00022 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00023}00023 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00024}00024 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00025}00025 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00026}00026 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00027}00027 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00028}00028 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00029}00029 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00030}00030 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00031}00031 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00032}00032 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00033}00033 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00034}00034 \textcolor{comment}{ * \$FreeBSD\$}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00035}00035 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00036}00036 }
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00037}00037 \textcolor{preprocessor}{\#ifndef \_SYS\_GEOM\_BDE\_G\_BDE\_H\_}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00038}00038 \textcolor{preprocessor}{\#define \_SYS\_GEOM\_BDE\_G\_BDE\_H\_ 1}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00039}00039 }
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00040}00040 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00041}00041 \textcolor{comment}{ * These are quite, but not entirely unlike constants.}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00042}00042 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00043}00043 \textcolor{comment}{ * They are not commented in details here, to prevent unadvisable}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00044}00044 \textcolor{comment}{ * experimentation. Please consult the code where they are used before you}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00045}00045 \textcolor{comment}{ * even think about modifying these.}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00046}00046 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00047}00047 }
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00048}\mbox{\hyperlink{g__bde_8h_a92a550537fff119d0ed7632b75ea23c3}{00048}} \textcolor{preprocessor}{\#define G\_BDE\_MKEYLEN   (2048/8)}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00049}\mbox{\hyperlink{g__bde_8h_aa2e8cd900a66aea1ef03f639a2adaefd}{00049}} \textcolor{preprocessor}{\#define G\_BDE\_SKEYBITS  128}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00050}\mbox{\hyperlink{g__bde_8h_aeb4e94faeca023758a78cd9cd45cc656}{00050}} \textcolor{preprocessor}{\#define G\_BDE\_SKEYLEN   (G\_BDE\_SKEYBITS/8)}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00051}\mbox{\hyperlink{g__bde_8h_ac023a67b536d4bd7b16f5a6e17b6614c}{00051}} \textcolor{preprocessor}{\#define G\_BDE\_KKEYBITS  128}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00052}\mbox{\hyperlink{g__bde_8h_af85331b03160162adca71ab432df6960}{00052}} \textcolor{preprocessor}{\#define G\_BDE\_KKEYLEN   (G\_BDE\_KKEYBITS/8)}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00053}\mbox{\hyperlink{g__bde_8h_a0f44849dd4673db8de19f94a741d27a7}{00053}} \textcolor{preprocessor}{\#define G\_BDE\_MAXKEYS   4}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00054}\mbox{\hyperlink{g__bde_8h_a5f776be28c749118116249f13953d13c}{00054}} \textcolor{preprocessor}{\#define G\_BDE\_LOCKSIZE  384}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00055}\mbox{\hyperlink{g__bde_8h_a21fe3d6953b8844e9257ed9e1e1f2b6b}{00055}} \textcolor{preprocessor}{\#define NLOCK\_FIELDS    13}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00056}00056 }
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00057}00057 \textcolor{comment}{/* This just needs to be "{}large enough"{} */}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00058}\mbox{\hyperlink{g__bde_8h_ad2efcf5bc0c2ec06b62d36b452c95ab4}{00058}} \textcolor{preprocessor}{\#define G\_BDE\_KEYBYTES  304}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00059}00059 }
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00060}00060 \textcolor{comment}{/* This file is being included by userspace. */}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00061}00061 \textcolor{preprocessor}{\#ifndef \_\_diagused}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00062}\mbox{\hyperlink{g__bde_8h_aabb5ad70c88f55209cff7ec5684d13c1}{00062}} \textcolor{preprocessor}{\#define \_\_diagused}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00063}00063 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00064}00064 }
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00065}00065 \textcolor{keyword}{struct }\mbox{\hyperlink{structg__bde__work}{g\_bde\_work}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00066}00066 \textcolor{keyword}{struct }\mbox{\hyperlink{structg__bde__softc}{g\_bde\_softc}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00067}00067 }
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00068}\mbox{\hyperlink{structg__bde__sector}{00068}} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__bde__sector}{g\_bde\_sector}} \{}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00069}\mbox{\hyperlink{structg__bde__sector_a8ad33c0d9ceb6428427b23591153011d}{00069}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__bde__work}{g\_bde\_work}}     *\mbox{\hyperlink{structg__bde__sector_a8ad33c0d9ceb6428427b23591153011d}{owner}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00070}\mbox{\hyperlink{structg__bde__sector_af72e5ec757f209224a78404cddef3727}{00070}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__bde__softc}{g\_bde\_softc}}   *\mbox{\hyperlink{structg__bde__sector_af72e5ec757f209224a78404cddef3727}{softc}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00071}\mbox{\hyperlink{structg__bde__sector_a1b4e0c70a0f4aa3982da2a4072f2f9f2}{00071}}         off\_t                   \mbox{\hyperlink{structg__bde__sector_a1b4e0c70a0f4aa3982da2a4072f2f9f2}{offset}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00072}\mbox{\hyperlink{structg__bde__sector_abcab68e7b7f896b4b9c47ce35321a003}{00072}}         u\_int                   \mbox{\hyperlink{structg__bde__sector_abcab68e7b7f896b4b9c47ce35321a003}{size}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00073}\mbox{\hyperlink{structg__bde__sector_a535a27e38aba9ea91d88974815eb2b08}{00073}}         u\_int                   \mbox{\hyperlink{structg__bde__sector_a535a27e38aba9ea91d88974815eb2b08}{ref}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00074}\mbox{\hyperlink{structg__bde__sector_ab14f76aa177a3dbb8e2dff0dc721cf2a}{00074}}         \textcolor{keywordtype}{void}                    *\mbox{\hyperlink{structg__bde__sector_ab14f76aa177a3dbb8e2dff0dc721cf2a}{data}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00075}\mbox{\hyperlink{structg__bde__sector_a87c8545c140dc766f61db25228fb52c0}{00075}}         \mbox{\hyperlink{structg__bde__sector_a87c8545c140dc766f61db25228fb52c0}{TAILQ\_ENTRY}}(\mbox{\hyperlink{structg__bde__sector}{g\_bde\_sector}}) list;}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00076}\mbox{\hyperlink{structg__bde__sector_a3d8420b00fb5082878b723a33336bf46}{00076}}         u\_char                  \mbox{\hyperlink{structg__bde__sector_a3d8420b00fb5082878b723a33336bf46}{valid}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00077}\mbox{\hyperlink{structg__bde__sector_a3c21c9c400fe675b80cb6fddf1f0f9ae}{00077}}         u\_char                  \mbox{\hyperlink{structg__bde__sector_a3c21c9c400fe675b80cb6fddf1f0f9ae}{malloc}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00078}\mbox{\hyperlink{structg__bde__sector_a647e728e060bcf34f166941492529c66affbc70661b7a4176773ddf016b35571c}{00078}}         \textcolor{keyword}{enum} \{\mbox{\hyperlink{structg__bde__sector_a647e728e060bcf34f166941492529c66af792e648802169d272b5650bb1e38a71}{JUNK}}, \mbox{\hyperlink{structg__bde__sector_a647e728e060bcf34f166941492529c66affbc70661b7a4176773ddf016b35571c}{IO}}, \mbox{\hyperlink{structg__bde__sector_a647e728e060bcf34f166941492529c66af0dfaf7c76327eae9884d677fa91e5a6}{VALID}}\}       \mbox{\hyperlink{structg__bde__sector_ae7a82320e88fffd6ec4738e3cc02d65a}{state}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00079}\mbox{\hyperlink{structg__bde__sector_a7b583ef4bfbb0824e049ab59823730cf}{00079}}         \textcolor{keywordtype}{int}                     \mbox{\hyperlink{structg__bde__sector_a7b583ef4bfbb0824e049ab59823730cf}{error}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00080}\mbox{\hyperlink{structg__bde__sector_abd730bed7e2bcb043544d28f928c0aae}{00080}}         time\_t                  \mbox{\hyperlink{structg__bde__sector_abd730bed7e2bcb043544d28f928c0aae}{used}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00081}00081 \};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00082}00082 }
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00083}\mbox{\hyperlink{structg__bde__work}{00083}} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__bde__work}{g\_bde\_work}} \{}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00084}\mbox{\hyperlink{structg__bde__work_a5200ce1c59d0a51e6cc34a508a830317}{00084}}         \textcolor{keyword}{struct }mtx              \mbox{\hyperlink{structg__bde__work_a5200ce1c59d0a51e6cc34a508a830317}{mutex}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00085}\mbox{\hyperlink{structg__bde__work_a3e62b5e2255f2d340b3f661458d05ad8}{00085}}         off\_t                   \mbox{\hyperlink{structg__bde__work_a3e62b5e2255f2d340b3f661458d05ad8}{offset}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00086}\mbox{\hyperlink{structg__bde__work_a9f7d343383548b89da65779a624142d1}{00086}}         off\_t                   \mbox{\hyperlink{structg__bde__work_a9f7d343383548b89da65779a624142d1}{length}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00087}\mbox{\hyperlink{structg__bde__work_a6feacf929bb3b01d0a28013504de8d8a}{00087}}         \textcolor{keywordtype}{void}                    *\mbox{\hyperlink{structg__bde__work_a6feacf929bb3b01d0a28013504de8d8a}{data}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00088}\mbox{\hyperlink{structg__bde__work_a7619c185f0faa0a4f16c362c8065b902}{00088}}         \textcolor{keyword}{struct }bio              *\mbox{\hyperlink{structg__bde__work_a7619c185f0faa0a4f16c362c8065b902}{bp}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00089}\mbox{\hyperlink{structg__bde__work_a95d7fe0bbd8677b35b2872432580b2f5}{00089}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__bde__softc}{g\_bde\_softc}}   *\mbox{\hyperlink{structg__bde__work_a95d7fe0bbd8677b35b2872432580b2f5}{softc}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00090}\mbox{\hyperlink{structg__bde__work_a1f99159bf221d1f9d359d5c35a4b02e6}{00090}}         off\_t                   \mbox{\hyperlink{structg__bde__work_a1f99159bf221d1f9d359d5c35a4b02e6}{so}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00091}\mbox{\hyperlink{structg__bde__work_aacdf8f69d74bf6a308fd80ca7f77eac9}{00091}}         off\_t                   \mbox{\hyperlink{structg__bde__work_aacdf8f69d74bf6a308fd80ca7f77eac9}{kso}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00092}\mbox{\hyperlink{structg__bde__work_a4e98481241d51940b80fc557434a1e53}{00092}}         u\_int                   \mbox{\hyperlink{structg__bde__work_a4e98481241d51940b80fc557434a1e53}{ko}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00093}\mbox{\hyperlink{structg__bde__work_ab479e99436eaef7b084e0de5b8efbacd}{00093}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__bde__sector}{g\_bde\_sector}}         *\mbox{\hyperlink{structg__bde__work_ab479e99436eaef7b084e0de5b8efbacd}{sp}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00094}\mbox{\hyperlink{structg__bde__work_a24857e16bf46ac3c536872760b0e6986}{00094}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__bde__sector}{g\_bde\_sector}}         *\mbox{\hyperlink{structg__bde__work_a24857e16bf46ac3c536872760b0e6986}{ksp}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00095}\mbox{\hyperlink{structg__bde__work_a89ee1451806e28146e15308deea08120}{00095}}         \mbox{\hyperlink{structg__bde__work_a89ee1451806e28146e15308deea08120}{TAILQ\_ENTRY}}(\mbox{\hyperlink{structg__bde__work}{g\_bde\_work}}) list;}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00096}\mbox{\hyperlink{structg__bde__work_a81a2b7c3e31e3245dd9f11e493e0909fa892ac13828ead87face41b314f72c0fb}{00096}}         \textcolor{keyword}{enum} \{\mbox{\hyperlink{structg__bde__work_a81a2b7c3e31e3245dd9f11e493e0909fa45f86250f4b012b43c59a3ab2fb63656}{SETUP}}, \mbox{\hyperlink{structg__bde__work_a81a2b7c3e31e3245dd9f11e493e0909fa0b75a2ef4fd95e1fe13a8576df1ccf51}{WAIT}}, \mbox{\hyperlink{structg__bde__work_a81a2b7c3e31e3245dd9f11e493e0909fa892ac13828ead87face41b314f72c0fb}{FINISH}}\} \mbox{\hyperlink{structg__bde__work_a49d926d67df62d56e5b510d58a76edab}{state}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00097}\mbox{\hyperlink{structg__bde__work_aa31308ed7d14f7b5a7ad6596f103baf2}{00097}}         \textcolor{keywordtype}{int}                     \mbox{\hyperlink{structg__bde__work_aa31308ed7d14f7b5a7ad6596f103baf2}{error}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00098}00098 \};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00099}00099 }
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00100}00100 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00101}00101 \textcolor{comment}{ * The decrypted contents of the lock sectors.  Notice that this is not}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00102}00102 \textcolor{comment}{ * the same as the on-\/disk layout.  The on-\/disk layout is dynamic and}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00103}00103 \textcolor{comment}{ * dependent on the pass-\/phrase.}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00104}00104 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00105}\mbox{\hyperlink{structg__bde__key}{00105}} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__bde__key}{g\_bde\_key}} \{}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00106}\mbox{\hyperlink{structg__bde__key_ac3bc453b01531611394dcabb3c25ead6}{00106}}         uint64\_t                \mbox{\hyperlink{structg__bde__key_ac3bc453b01531611394dcabb3c25ead6}{sector0}};        }
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00107}00107                                 \textcolor{comment}{/* Physical byte offset of 1st byte used */}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00108}\mbox{\hyperlink{structg__bde__key_a24a6da7f1a62a46ce669f45927f00307}{00108}}         uint64\_t                \mbox{\hyperlink{structg__bde__key_a24a6da7f1a62a46ce669f45927f00307}{sectorN}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00109}00109                                 \textcolor{comment}{/* Physical byte offset of 1st byte not used */}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00110}\mbox{\hyperlink{structg__bde__key_a584abb7851a7de46edfcee8b05f6f13f}{00110}}         uint64\_t                \mbox{\hyperlink{structg__bde__key_a584abb7851a7de46edfcee8b05f6f13f}{keyoffset}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00111}00111                                 \textcolor{comment}{/* Number of bytes the disk image is skewed. */}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00112}\mbox{\hyperlink{structg__bde__key_ad26d0aae2eb539ddd316bdaac5a6fabe}{00112}}         uint64\_t                \mbox{\hyperlink{structg__bde__key_ad26d0aae2eb539ddd316bdaac5a6fabe}{lsector}}[\mbox{\hyperlink{g__bde_8h_a0f44849dd4673db8de19f94a741d27a7}{G\_BDE\_MAXKEYS}}];}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00113}00113                                 \textcolor{comment}{/* Physical byte offsets of lock sectors */}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00114}\mbox{\hyperlink{structg__bde__key_a66aa1db7d90034f5b5ac35ba7a011ab7}{00114}}         uint32\_t                \mbox{\hyperlink{structg__bde__key_a66aa1db7d90034f5b5ac35ba7a011ab7}{sectorsize}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00115}00115                                 \textcolor{comment}{/* Our "{}logical"{} sector size */}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00116}\mbox{\hyperlink{structg__bde__key_a1012e5b3d52eba182fd2f716d2e7d84f}{00116}}         uint32\_t                \mbox{\hyperlink{structg__bde__key_a1012e5b3d52eba182fd2f716d2e7d84f}{flags}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00117}\mbox{\hyperlink{g__bde_8h_a3181cc6aa48261fcb4f5caf51f6dd2aa}{00117}} \textcolor{preprocessor}{\#define GBDE\_F\_SECT0            1}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00118}\mbox{\hyperlink{structg__bde__key_abb805853def101310aac4f48b0dd22a9}{00118}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}                  \mbox{\hyperlink{structg__bde__key_abb805853def101310aac4f48b0dd22a9}{salt}}[16];}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00119}00119                                 \textcolor{comment}{/* Used to frustate the kkey generation */}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00120}\mbox{\hyperlink{structg__bde__key_ab34992a035e2b0c5f3331bee50b92da8}{00120}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}                  \mbox{\hyperlink{structg__bde__key_ab34992a035e2b0c5f3331bee50b92da8}{spare}}[32];}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00121}00121                                 \textcolor{comment}{/* For future use, random contents */}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00122}\mbox{\hyperlink{structg__bde__key_a77621e014c439240f155633e58960277}{00122}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}                  \mbox{\hyperlink{structg__bde__key_a77621e014c439240f155633e58960277}{mkey}}[\mbox{\hyperlink{g__bde_8h_a92a550537fff119d0ed7632b75ea23c3}{G\_BDE\_MKEYLEN}}];}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00123}00123                                 \textcolor{comment}{/* Our masterkey. */}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00124}00124 }
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00125}00125         \textcolor{comment}{/* Non-\/stored help-\/fields */}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00126}\mbox{\hyperlink{structg__bde__key_ae57a9921228a0b26282b8a131623d630}{00126}}         uint64\_t                \mbox{\hyperlink{structg__bde__key_ae57a9921228a0b26282b8a131623d630}{zone\_width}};   \textcolor{comment}{/* On-\/disk width of zone */}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00127}\mbox{\hyperlink{structg__bde__key_a19fcaf93ac99c557c6bb6f6ed0ee2c42}{00127}}         uint64\_t                \mbox{\hyperlink{structg__bde__key_a19fcaf93ac99c557c6bb6f6ed0ee2c42}{zone\_cont}};     \textcolor{comment}{/* Payload width of zone */}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00128}\mbox{\hyperlink{structg__bde__key_a71c1315e6871a2546e82ab7e38d93b23}{00128}}         uint64\_t                \mbox{\hyperlink{structg__bde__key_a71c1315e6871a2546e82ab7e38d93b23}{media\_width}}; \textcolor{comment}{/* Non-\/magic width of zone */}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00129}\mbox{\hyperlink{structg__bde__key_a19801ede0848a12614c8402be36fa40d}{00129}}         u\_int                   \mbox{\hyperlink{structg__bde__key_a19801ede0848a12614c8402be36fa40d}{keys\_per\_sector}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00130}00130 \};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00131}00131 }
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00132}\mbox{\hyperlink{structg__bde__softc}{00132}} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__bde__softc}{g\_bde\_softc}} \{}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00133}\mbox{\hyperlink{structg__bde__softc_a6dbd335cfec2c527075a9df582778506}{00133}}         off\_t                   \mbox{\hyperlink{structg__bde__softc_a6dbd335cfec2c527075a9df582778506}{mediasize}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00134}\mbox{\hyperlink{structg__bde__softc_a3550952b25e3c8697e43254841743beb}{00134}}         u\_int                   \mbox{\hyperlink{structg__bde__softc_a3550952b25e3c8697e43254841743beb}{sectorsize}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00135}\mbox{\hyperlink{structg__bde__softc_a4153065111056f3bd3269dd988cb05dd}{00135}}         uint64\_t                \mbox{\hyperlink{structg__bde__softc_a4153065111056f3bd3269dd988cb05dd}{zone\_cont}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00136}\mbox{\hyperlink{structg__bde__softc_ac17ac7126b208895820c4457f14db013}{00136}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}}             *\mbox{\hyperlink{structg__bde__softc_ac17ac7126b208895820c4457f14db013}{geom}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00137}\mbox{\hyperlink{structg__bde__softc_a3bc97d06913991a91d0e7009c6991ce5}{00137}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}}     *\mbox{\hyperlink{structg__bde__softc_a3bc97d06913991a91d0e7009c6991ce5}{consumer}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00138}\mbox{\hyperlink{structg__bde__softc_a75afa4a097d5eb0dc8a6d03e0e70b03c}{00138}}         \mbox{\hyperlink{structg__bde__softc_a75afa4a097d5eb0dc8a6d03e0e70b03c}{TAILQ\_HEAD}}(, \mbox{\hyperlink{structg__bde__sector}{g\_bde\_sector}})        freelist;}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00139}\mbox{\hyperlink{structg__bde__softc_ad7ec9f5e48cfc8da57bf41bdf1d2c3aa}{00139}}         \mbox{\hyperlink{structg__bde__softc_ad7ec9f5e48cfc8da57bf41bdf1d2c3aa}{TAILQ\_HEAD}}(, \mbox{\hyperlink{structg__bde__work}{g\_bde\_work}})    worklist;}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00140}\mbox{\hyperlink{structg__bde__softc_a7a9fcb7e0a97a3af4186b18ca2db9daa}{00140}}         \textcolor{keyword}{struct }mtx              \mbox{\hyperlink{structg__bde__softc_a7a9fcb7e0a97a3af4186b18ca2db9daa}{worklist\_mutex}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00141}\mbox{\hyperlink{structg__bde__softc_a2db125456c211ba6ee623cfa11a23bc8}{00141}}         \textcolor{keyword}{struct }proc             *\mbox{\hyperlink{structg__bde__softc_a2db125456c211ba6ee623cfa11a23bc8}{thread}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00142}\mbox{\hyperlink{structg__bde__softc_aed5c45f058e35c02ee14c6707fcc0b37}{00142}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__bde__key}{g\_bde\_key}}       \mbox{\hyperlink{structg__bde__softc_aed5c45f058e35c02ee14c6707fcc0b37}{key}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00143}\mbox{\hyperlink{structg__bde__softc_a42b28a4bf4f575371fcdfda95425c601}{00143}}         \textcolor{keywordtype}{int}                     \mbox{\hyperlink{structg__bde__softc_a42b28a4bf4f575371fcdfda95425c601}{dead}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00144}\mbox{\hyperlink{structg__bde__softc_ad937d083b6dfd561458ee735b1ed29eb}{00144}}         u\_int                   \mbox{\hyperlink{structg__bde__softc_ad937d083b6dfd561458ee735b1ed29eb}{nwork}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00145}\mbox{\hyperlink{structg__bde__softc_ae92a95f9a8d09c55e4c0a7523f8881bb}{00145}}         u\_int                   \mbox{\hyperlink{structg__bde__softc_ae92a95f9a8d09c55e4c0a7523f8881bb}{nsect}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00146}\mbox{\hyperlink{structg__bde__softc_adc7fe17205e2babf6c98b60f2bbb2c84}{00146}}         u\_int                   \mbox{\hyperlink{structg__bde__softc_adc7fe17205e2babf6c98b60f2bbb2c84}{ncache}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00147}\mbox{\hyperlink{structg__bde__softc_a3004ff7ec5e1294d1cca2bbd35ea3e29}{00147}}         u\_char                  \mbox{\hyperlink{structg__bde__softc_a3004ff7ec5e1294d1cca2bbd35ea3e29}{sha2}}[SHA512\_DIGEST\_LENGTH];}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00148}00148 \};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00149}00149 }
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00150}00150 \textcolor{comment}{/* g\_bde\_crypt.c */}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00151}00151 \textcolor{keywordtype}{void} \mbox{\hyperlink{g__bde_8h_aa424947a388f787015d468937a543765}{g\_bde\_crypt\_delete}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__bde__work}{g\_bde\_work}} *wp);}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00152}00152 \textcolor{keywordtype}{void} \mbox{\hyperlink{g__bde_8h_a0e360ba2bc6c7e1f8cd28e1766276311}{g\_bde\_crypt\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__bde__work}{g\_bde\_work}} *wp);}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00153}00153 \textcolor{keywordtype}{void} \mbox{\hyperlink{g__bde_8h_a3704204fda32232892e3c0f046c04e8c}{g\_bde\_crypt\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__bde__work}{g\_bde\_work}} *wp);}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00154}00154 }
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00155}00155 \textcolor{comment}{/* g\_bde\_key.c */}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00156}\mbox{\hyperlink{g__bde_8h_a94d0d46469849b5f0dce88e97215385d}{00156}} \textcolor{keywordtype}{void} \mbox{\hyperlink{g__bde_8h_a94d0d46469849b5f0dce88e97215385d}{g\_bde\_zap\_key}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__bde__softc}{g\_bde\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00157}\mbox{\hyperlink{g__bde_8h_a0ac13709080ccf0bf60d511df6db96c7}{00157}} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__bde_8h_a0ac13709080ccf0bf60d511df6db96c7}{g\_bde\_get\_key}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__bde__softc}{g\_bde\_softc}} *sc, \textcolor{keywordtype}{void} *ptr, \textcolor{keywordtype}{int} len);}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00158}\mbox{\hyperlink{g__bde_8h_a9280f5e251f3301a8a45da89e31cf312}{00158}} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__bde_8h_a9280f5e251f3301a8a45da89e31cf312}{g\_bde\_init\_keybytes}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__bde__softc}{g\_bde\_softc}} *sc, \textcolor{keywordtype}{char} *passp, \textcolor{keywordtype}{int} len);}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00159}00159 }
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00160}00160 \textcolor{comment}{/* g\_bde\_lock .c */}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00161}00161 \textcolor{keywordtype}{int} \mbox{\hyperlink{g__bde_8h_ad69ecfe3a582f50544c89fba125cd66e}{g\_bde\_encode\_lock}}(u\_char *sha2, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__bde__key}{g\_bde\_key}} *gl, u\_char *ptr);}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00162}00162 \textcolor{keywordtype}{int} \mbox{\hyperlink{g__bde_8h_af339e70d3ac7ec78e2151533ffe938c3}{g\_bde\_decode\_lock}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__bde__softc}{g\_bde\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__bde__key}{g\_bde\_key}} *gl, u\_char *ptr);}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00163}00163 \textcolor{keywordtype}{int} \mbox{\hyperlink{g__bde_8h_a5534d1f15d8ca8c1d65e97ecf4165c1b}{g\_bde\_keyloc\_encrypt}}(u\_char *sha2, uint64\_t v0, uint64\_t v1, \textcolor{keywordtype}{void} *output);}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00164}00164 \textcolor{keywordtype}{int} \mbox{\hyperlink{g__bde_8h_a310e51f6b1a625aa5573d3888662a8ea}{g\_bde\_keyloc\_decrypt}}(u\_char *sha2, \textcolor{keywordtype}{void} *input, uint64\_t *output);}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00165}00165 \textcolor{keywordtype}{int} \mbox{\hyperlink{g__bde_8h_a39fd847b1c2a22e14446402feaf1442b}{g\_bde\_decrypt\_lock}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__bde__softc}{g\_bde\_softc}} *sc, u\_char *keymat, u\_char *meta, off\_t mediasize, u\_int \mbox{\hyperlink{structg__bde__key_a66aa1db7d90034f5b5ac35ba7a011ab7}{sectorsize}}, u\_int *nkey);}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00166}00166 \textcolor{keywordtype}{void} \mbox{\hyperlink{g__bde_8h_af46081ae7dda9d7486438fe24b6a9316}{g\_bde\_hash\_pass}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__bde__softc}{g\_bde\_softc}} *sc, \textcolor{keyword}{const} \textcolor{keywordtype}{void} *input, u\_int len);}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00167}00167 }
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00168}00168 \textcolor{comment}{/* g\_bde\_math .c */}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00169}00169 uint64\_t \mbox{\hyperlink{g__bde_8h_a1a81354f303cb614add4800492d5298a}{g\_bde\_max\_sector}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__bde__key}{g\_bde\_key}} *lp);}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00170}00170 \textcolor{keywordtype}{void} \mbox{\hyperlink{g__bde_8h_ac2890ae097fa50be721493bdd8d5b3d7}{g\_bde\_map\_sector}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__bde__work}{g\_bde\_work}} *wp);}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00171}00171 }
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00172}00172 \textcolor{comment}{/* g\_bde\_work.c */}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00173}00173 \textcolor{keywordtype}{void} \mbox{\hyperlink{g__bde_8h_afa8a48bd707806368e19c97a59f12718}{g\_bde\_start1}}(\textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}});}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00174}00174 \textcolor{keywordtype}{void} \mbox{\hyperlink{g__bde_8h_a6d037c99d1189618a550c7b1d84b53bb}{g\_bde\_worker}}(\textcolor{keywordtype}{void} *arg);}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00175}00175 }
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00176}00176 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00177}00177 \textcolor{comment}{ * These four functions wrap the raw Rijndael functions and make sure we}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00178}00178 \textcolor{comment}{ * explode if something fails which shouldn't.}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00179}00179 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00180}00180 }
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00181}00181 \textcolor{keyword}{static} \_\_inline \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00182}\mbox{\hyperlink{g__bde_8h_ab5d14c928ffff64fb86d9524d0f5dada}{00182}} \mbox{\hyperlink{g__bde_8h_ab5d14c928ffff64fb86d9524d0f5dada}{AES\_init}}(cipherInstance *ci)}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00183}00183 \{}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00184}00184         \textcolor{keywordtype}{int} error \mbox{\hyperlink{g__bde_8h_aabb5ad70c88f55209cff7ec5684d13c1}{\_\_diagused}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00185}00185 }
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00186}00186         error = rijndael\_cipherInit(ci, MODE\_CBC, NULL);}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00187}00187         KASSERT(error > 0, (\textcolor{stringliteral}{"{}rijndael\_cipherInit \%d"{}}, error));}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00188}00188 \}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00189}00189 }
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00190}00190 \textcolor{keyword}{static} \_\_inline \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00191}\mbox{\hyperlink{g__bde_8h_a7620f4db15c690c1dbf4dfc40a656727}{00191}} \mbox{\hyperlink{g__bde_8h_a7620f4db15c690c1dbf4dfc40a656727}{AES\_makekey}}(keyInstance *ki, \textcolor{keywordtype}{int} dir, u\_int len, \textcolor{keyword}{const} \textcolor{keywordtype}{void} *key)}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00192}00192 \{}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00193}00193         \textcolor{keywordtype}{int} error \mbox{\hyperlink{g__bde_8h_aabb5ad70c88f55209cff7ec5684d13c1}{\_\_diagused}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00194}00194 }
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00195}00195         error = rijndael\_makeKey(ki, dir, len, key);}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00196}00196         KASSERT(error > 0, (\textcolor{stringliteral}{"{}rijndael\_makeKey \%d"{}}, error));}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00197}00197 \}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00198}00198 }
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00199}00199 \textcolor{keyword}{static} \_\_inline \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00200}\mbox{\hyperlink{g__bde_8h_ad6e8bd58e9bdf77aa27d86282309d0f4}{00200}} \mbox{\hyperlink{g__bde_8h_ad6e8bd58e9bdf77aa27d86282309d0f4}{AES\_encrypt}}(cipherInstance *ci, keyInstance *ki, \textcolor{keyword}{const} \textcolor{keywordtype}{void} *in, \textcolor{keywordtype}{void} *out, u\_int len)}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00201}00201 \{}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00202}00202         \textcolor{keywordtype}{int} error \mbox{\hyperlink{g__bde_8h_aabb5ad70c88f55209cff7ec5684d13c1}{\_\_diagused}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00203}00203 }
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00204}00204         error = rijndael\_blockEncrypt(ci, ki, in, len * 8, out);}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00205}00205         KASSERT(error > 0, (\textcolor{stringliteral}{"{}rijndael\_blockEncrypt \%d"{}}, error));}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00206}00206 \}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00207}00207 }
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00208}00208 \textcolor{keyword}{static} \_\_inline \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00209}\mbox{\hyperlink{g__bde_8h_a51f1110fa4c35557b1a2cd0b7d184c9f}{00209}} \mbox{\hyperlink{g__bde_8h_a51f1110fa4c35557b1a2cd0b7d184c9f}{AES\_decrypt}}(cipherInstance *ci, keyInstance *ki, \textcolor{keyword}{const} \textcolor{keywordtype}{void} *in, \textcolor{keywordtype}{void} *out, u\_int len)}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00210}00210 \{}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00211}00211         \textcolor{keywordtype}{int} error \mbox{\hyperlink{g__bde_8h_aabb5ad70c88f55209cff7ec5684d13c1}{\_\_diagused}};}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00212}00212 }
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00213}00213         error = rijndael\_blockDecrypt(ci, ki, in, len * 8, out);}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00214}00214         KASSERT(error > 0, (\textcolor{stringliteral}{"{}rijndael\_blockDecrypt \%d"{}}, error));}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00215}00215 \}}
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00216}00216 }
\DoxyCodeLine{\Hypertarget{g__bde_8h_source_l00217}00217 \textcolor{preprocessor}{\#endif }\textcolor{comment}{/* \_SYS\_GEOM\_BDE\_G\_BDE\_H\_ */}\textcolor{preprocessor}{}}

\end{DoxyCode}
