Type hb: HBytes_Value @
Init hb hbytes_sentinel(&@);
+
Type hbv: HBytes_Var @
-Init hbv @.hb=0; @.obj=0; @.var=0;
+Init hbv @.hb=0; @.obj=0; @.var=0; @.copied=0;
Fini hbv fini_hbv(ip, rc, &@);
+Type sockaddr: SockAddr_Value @
+Init sockaddr sockaddr_clear(&@);
+
+Type sockid: DgramSockID @
+Type ulong: uint32_t @
+Type long: long @
+
H-Include "hbytes.h"
-Untabled
+Table toplevel TopLevel_Command
hbytes
subcmd enum(HBytes_SubCommand, "hbytes subcommand")
- obj ...
+ ... obj
+ dgram-socket
+ subcmd enum(DgramSocket_SubCommand,"dgram-socket subcommand")
+ ... obj
+ ulong
+ subcmd enum(ULong_SubCommand,"ulong subcommand")
+ ... obj
+
+Table ulong ULong_SubCommand
+ ul2int
+ v ulong
+ => int
+ int2ul
+ v int
+ => ulong
+ mask
+ a ulong
+ b ulong
+ => ulong
+ add
+ a ulong
+ b ulong
+ => ulong
+ multiply
+ a ulong
+ b ulong
+ => ulong
+ subtract
+ a ulong
+ b ulong
+ => ulong
+ compare
+ a ulong
+ b ulong
+ => int
+ shift
+ right charfrom("lr", "shift direction")
+ v ulong
+ bits int
+ => ulong
+ ul2bitfields
+ value ulong
+ ... obj
+ => int
+ bitfields2ul
+ base ulong
+ ... obj
+ => ulong
Table hbytes HBytes_SubCommand
raw2h
h2raw
hex hb
=> obj
+ ushort2h
+ value long
+ => hb
+ h2ushort
+ hex hb
+ => long
+ length
+ v hb
+ => int
+ compare
+ a hb
+ b hb
+ => int
+ range
+ v hb
+ start int
+ size int
+ => hb
prepend
v hbv
- str ...
+ ... str
append
v hbv
- str ...
+ ... str
rep-info
- v hb
+ v obj
=> obj
concat
- str ...
+ ... str
=> hb
unprepend
v hbv
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
+ overwrite
+ v hbv
+ start int
+ sub hb
+ trimleft
+ v hbv
+ zeroes
+ length int
+ => hb
+ repeat
+ v hb
+ count int
+ => hb
+ xor
+ v hbv
+ d hb
+ random
+ length int
+ => hb
+ pad
+ op enum(PadOp, "hbytes pad subcommand")
+ v hbv
+ blocksz obj
+ meth enum(PadMethodInfo, "pad method")
+ ... methargs
+ blockcipher
+ op enum(BlockCipherOp, "op")
+ ... obj
+ hash
+ alg enum(HashAlgInfo, "hash alg")
+ message hb
+ => hb
+ hmac
+ alg enum(HashAlgInfo, "hash alg for hmac")
+ message hb
+ key obj
+ ?maclen obj
+ => hb
+ hash-prop
+ prop enum(HashAlgPropInfo, "prop")
+ alg enum(HashAlgInfo, "alg")
+ => int
+
+Table padmethodinfo PadMethodInfo
+ pkcs5
+ => int
+ rfc2406
+ nxthdr obj
+ => int
+
+Table dgram_socket DgramSocket_SubCommand
+ create
+ local sockaddr
+ => sockid
+ close
+ sock sockid
+ transmit
+ sock sockid
+ data hb
+ remote sockaddr
+ on-receive
+ sock sockid
+ ?script obj
-#Table padmethod PadMethod
-# pa 1, 0
+Table blockcipherop BlockCipherOp
+ e 1
+ v hbv
+ alg enum(BlockCipherAlgInfo, "alg")
+ key obj
+ mode enum(BlockCipherModeInfo, "mode")
+ ?iv hb
+ => hb
+ d 0
+ v hbv
+ alg enum(BlockCipherAlgInfo, "alg")
+ key obj
+ mode enum(BlockCipherModeInfo, "mode")
+ ?iv hb
+ => hb
+ mac -1
+ msg hb
+ alg enum(BlockCipherAlgInfo, "alg")
+ key obj
+ mode enum(BlockCipherModeInfo, "mode")
+ iv hb
+ => hb
+ prop -1
+ prop enum(BlockCipherPropInfo, "prop")
+ alg enum(BlockCipherAlgInfo, "alg")
+ => int
-#EntryExtra PadMethod
-# int pad, algname;
+EntryExtra BlockCipherOp
+ int encrypt;