243
243
extern gcry_md_spec_t _gcry_digest_spec_sha1;
244
244
extern gcry_md_spec_t _gcry_digest_spec_sha256;
245
245
extern gcry_md_spec_t _gcry_digest_spec_sha512;
246
247
#define GRUB_MD_MD5 ((const gcry_md_spec_t *) &_gcry_digest_spec_md5)
247
248
#define GRUB_MD_SHA1 ((const gcry_md_spec_t *) &_gcry_digest_spec_sha1)
248
249
#define GRUB_MD_SHA256 ((const gcry_md_spec_t *) &_gcry_digest_spec_sha256)
249
250
#define GRUB_MD_SHA512 ((const gcry_md_spec_t *) &_gcry_digest_spec_sha512)
251
253
/* Implement PKCS#5 PBKDF2 as per RFC 2898. The PRF to use is HMAC variant
252
254
of digest supplied by MD. Inputs are the password P of length PLEN,