First part of zfs-crypto. CCM support with 0-filled keys

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-11-06 13:18:27 +01:00
parent b632b404e0
commit 1bc7cc1b4d
6 changed files with 360 additions and 77 deletions

View file

@ -210,9 +210,10 @@ grub_crypto_ecb_decrypt (grub_crypto_cipher_handle_t cipher,
gcry_err_code_t
grub_crypto_ecb_encrypt (grub_crypto_cipher_handle_t cipher,
void *out, void *in, grub_size_t size)
void *out, const void *in, grub_size_t size)
{
grub_uint8_t *inptr, *outptr, *end;
const grub_uint8_t *inptr;
grub_uint8_t *outptr, *end;
if (!cipher->cipher->encrypt)
return GPG_ERR_NOT_SUPPORTED;
if (size % cipher->cipher->blocksize != 0)