X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-tcl.git;a=blobdiff_plain;f=crypto%2Fbcmode.c;h=9545af39b6644d2ab533c3e068379b8c13b0e574;hp=e413de72e78677b8af9ff57b91693fc651e405e7;hb=1306d8ad8b0597fd67d933a363d0be2ac891dd8a;hpb=fa11284b9469c1c79af7f8f129da934c1ebcf594 diff --git a/crypto/bcmode.c b/crypto/bcmode.c index e413de7..9545af3 100644 --- a/crypto/bcmode.c +++ b/crypto/bcmode.c @@ -1,7 +1,23 @@ /* + * crypto - Tcl bindings for parts of the `nettle' crypto library + * Copyright 2006-2012 Ian Jackson + * + * This program 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 2 of the + * License, or (at your option) any later version. + * + * This program 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 this library; if not, see . */ + -#include "hbytes.h" +#include "chiark_tcl_crypto.h" static const char *mode_cbc_encrypt(Byte *data, int blocks, const Byte *iv, Byte *chain, @@ -110,7 +126,7 @@ static const char *mode_ctr(Byte *data, int blocks, return 0; } -const BlockCipherModeInfo blockciphermodeinfos[]= { +const BlockCipherModeInfo cht_blockciphermodeinfo_entries[]= { { "cbc", 1, 2, 1, mode_cbc_encrypt, mode_cbc_decrypt, mode_cbc_mac }, { "cbc-mac2", 1, 2, 1, 0, 0, mode_cbc_mac2 }, { "ecb", 0, 0, 0, mode_ecb, mode_ecb, 0 },