grub/kern/crypto.c
Vladimir 'phcoder' Serbinenko 39f7c91b50 base for ciphers and digests
2009-11-10 01:01:11 +01:00

36 lines
1.1 KiB
C

/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 1999, 2001, 2002, 2003, 2007,
* 2008, 2009 Free Software Foundation, Inc.
*
* GRUB is free software: you can redistribute it and/or modify
* 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/>.
*/
#include <grub/crypto.h>
#include <grub/misc.h>
#include <grub/mm.h>
gcry_cipher_spec_t *grub_ciphers = NULL;
gcry_md_spec_t *grub_digests = NULL;
/* Based on libgcrypt-1.4.4/src/misc.c. */
void
grub_burn_stack (grub_size_t size)
{
char buf[64];
grub_memset (buf, 0, sizeof (buf));
size -= sizeof (buf);
if (size > 0)
grub_burn_stack (size);
}