X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-tcl.git;a=blobdiff_plain;f=crypto%2Fcrypto.c;h=aee2556de1fcde705642944110a78a5bdd6cd1de;hp=988d1bceb01e643afc7a14ef7b7cc57734990960;hb=eef51b4e49bda639a2f4e871b4d8ac00a0988103;hpb=5dca360f2da544c9b6baf9d18ad8cd0b0e073e60 diff --git a/crypto/crypto.c b/crypto/crypto.c index 988d1bc..aee2556 100644 --- a/crypto/crypto.c +++ b/crypto/crypto.c @@ -1,6 +1,6 @@ /* * crypto - Tcl bindings for parts of the `nettle' crypto library - * Copyright 2006 Ian Jackson + * 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 @@ -13,9 +13,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301, USA. + * along with this library; if not, see . */ @@ -147,15 +145,6 @@ int cht_do_padmethodinfo_pkcs5(ClientData cd, Tcl_Interp *ip, int *ok) { return TCL_OK; } -int cht_do_hbcrypto_hash(ClientData cd, Tcl_Interp *ip, const HashAlgInfo *alg, - HBytes_Value message, HBytes_Value *result) { - Byte *dest; - - dest= cht_hb_arrayspace(result,alg->hashsize); - alg->oneshot(dest, cht_hb_data(&message), cht_hb_len(&message)); - return TCL_OK; -} - #define OBJ_CIPHKEY(o) ((CiphKeyValue*)(o)->internalRep.otherValuePtr) typedef struct { @@ -195,7 +184,7 @@ static void key_t_dup(Tcl_Obj *src_obj, Tcl_Obj *dup_obj) { } static void key_t_ustr(Tcl_Obj *o) { - obj_updatestr_array(o, OBJ_CIPHKEY(o)->value, OBJ_CIPHKEY(o)->valuelen); + cht_obj_updatestr_array(o, OBJ_CIPHKEY(o)->value, OBJ_CIPHKEY(o)->valuelen); } static int key_t_sfa(Tcl_Interp *ip, Tcl_Obj *o) {