/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2009 Free Software Foundation, Inc.
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GRUB is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
GRUB_MOD_LICENSE ("GPLv3+");
struct pbkdf2_password
{
unsigned int c;
};
static grub_err_t
{
if (!buf)
return grub_crypto_gcry_error (GPG_ERR_OUT_OF_MEMORY);
if (err)
{
return grub_crypto_gcry_error (err);
}
return GRUB_ACCESS_DENIED;
return GRUB_ERR_NONE;
}
static inline int
{
return hex - '0';
return -1;
}
static grub_err_t
{
if (argc != 2)
sizeof ("grub.pbkdf2.sha512.") - 1) != 0)
if (!pass)
return grub_errno;
if (*ptr != '.')
{
}
ptr++;
{
}
if (!ptro)
{
return grub_errno;
}
{
ptr++;
ptr++;
{
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"Incorrect PBKDF2 password.");
}
ptro++;
}
if (!ptro)
{
return grub_errno;
}
{
ptr++;
ptr++;
{
return grub_error (GRUB_ERR_BAD_ARGUMENT,
"Incorrect PBKDF2 password.");
}
ptro++;
}
if (err)
{
return err;
}
return GRUB_ERR_NONE;
}
{
N_("USER PBKDF2_PASSWORD"),
N_("Set user password (PBKDF2). "));
}
{
}