X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;ds=sidebyside;f=base%2Ftables-examples.tct;h=ecb5d7cf3ed30413f7b0a6e8048d6e59802c6948;hb=2cf1bfc63e73a424f9f3899c204025a8346b38e0;hp=53fd2399310a0d0c86732a7ef41f3fa3a760c2df;hpb=427c2d3d8b6ae6b580c773400c00322242014558;p=chiark-tcl.git diff --git a/base/tables-examples.tct b/base/tables-examples.tct index 53fd239..ecb5d7c 100644 --- a/base/tables-examples.tct +++ b/base/tables-examples.tct @@ -1,56 +1,70 @@ -Type hb: Tcl_Obj/*hbytes*/ *@ -Type hbv: Tcl_Obj/*hbytes*/ *@ +Type hb: HBytes_Value @ +Init hb hbytes_sentinel(&@); +Type hbv: HBytes_Var @ +Init hbv @.hb=0; @.obj=0; @.var=0; +Fini hbv fini_hbv(ip, rc, &@); -Table hbytes +H-Include "hbytes.h" + +Untabled + hbytes + subcmd enum(HBytes_SubCommand, "hbytes subcommand") + obj ... + +Table hbytes HBytes_SubCommand raw2h binary obj => hb h2raw hex hb => obj - prefix - v hbv - str ... - append - v hbv - str ... - concat - v hbv - str ... - unprepend - v hbv - length int - => hb - unappend - v hbv - length int - => hb - chopto - v hbv - length int - => hb - pkcs5 - meth enum(PadMethodInfo,padmethodinfos) - arg ... - blockcipher - encrypt charfrom("de") - v hbv - alg enum(BlockCipherAlgInfo,blockcipheralginfos) - mode enum(BlockCipherModeInfo,blockciphermodeinfos) - ?iv hb - => hb - hash - alg enum(HashAlgInfo,hashalginfos) - message hb - => hb - hmac - alg enum(HashAlgInfo,hashalginfos) - message hb - key hb - maclen int + prepend + v hbv + str ... + append + v hbv + str ... + rep-info + v hb + => obj + concat + str ... => hb + unprepend + v hbv + length int + => hb + unappend + v hbv + length int + => hb + chopto + v hbv + length int + => hb +# pkcs5 +# meth enum(PadMethod, "hbytes pad subcommand") +# obj ... +# blockcipher +# encrypt charfrom("de","encrypt/decrypt") +# v hbv +# alg enum(BlockCipherAlgInfo, "alg") +# mode enum(BlockCipherModeInfo, "mode") +# ?iv hb +# => hb +# hash +# alg enum(HashAlgInfo, "hash alg") +# message hb +# => hb +# hmac +# alg enum(HashAlgInfo, "hash alg for hmac") +# message hb +# key hb +# maclen int +# => hb + +#Table padmethod PadMethod +# pa 1, 0 -#Table padmethodinfos -# Info -# int algname; -#Entries +#EntryExtra PadMethod +# int pad, algname;