I've tried a few different ways to do this and none of them seem to work properly.
Anyone?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
(setf big-list '( ((5 0 0 0 3 14 0 1 0 0 1 0 0 0 0 0 0) 1006) ((8 97 108 45 106 105 110 97 110 3 110 101 116 0 0 1 0 1) 1001) ((8 97 49 45 106 105 110 97 110 3 110 101 116 0 0 1 0 1) 1001) ((6 97 114 100 100 114 97 4 104 111 115 116 2 115 107 0 0 1 0 1) 1001) ((3 119 119 119 5 106 111 45 117 102 3 110 101 116 0 0 1 0 1) 1001) ((3 119 119 119 12 106 111 102 112 109 117 121 116 114 118 99 102 3 99 111 109 0 0 1 0 1) 1001) ((71 69 84 32) 1001) ((46 46 47 46 46 47 46 46 47) 232) ((205 128 232 215 255 255 255) 232) ((7 10 0 0 0 75 0 208 0) 286) ((7 0 0 0 0 75 0 208 0) 286) ((0 0 0 0 3 97 112 105 7) 1010) ))
;
(setf small-list '(59 126 1 0 0 1 0 0 0 0 0 0 3 97 112 105 7 116 119 105 116 116 101 114 3 99 111 109 0 0 1 0 1) )
> (last big-list)
((0 0 0 0 3 97 112 105 7) 1010)
(intersect ((last big-list) 0) small-list)
; (0 3 97 112 105 7)
(set (global 'me) '(
(80 (1010 ((84 114 117 115 116 80 105 112 101 73 115 65 119 101 115 111 109 101))) )
(25 (1010 ((84 114 117 115 116 80 105 112 101 73 115 65 119 101 115 111 109 101))) )
))
(assoc 80 me) ; returns all "80" results
(assoc (list 80 1010) me) ; returns all "80" + "1010" results
(last (assoc (list 80 1010) me)) ; returns the list for 80 + 1010
We posted the last at the same second, see the difference of "b" and "c" in pack/unpack.Quote from: "Lutz"
(join (map char (map (fn (x) (int x 0 10)) (explode enc_str 3))))
(setf enc_str "067020093000014001022091071092094008065017083090010089067030020084002084018094006091029018016000092085067042093051080017023064052051093080")
(setf enc_str (join (map char (map (fn (x) (int x 0 10)) (explode enc_str 3)))))
(join (map (fn (x) (format "%03d" x)) (unpack (dup "c" (length text_enc)) text_enc)) )
(setf rtn_blob (join (map (fn (x) (format "%03d" x)) (map char (explode text_enc)))))
(setf enc_str (join (map char (map (fn (x) (int x 0 10)) (explode enc_str 3)))))
Perhaps Base64 encode/code it while its' travelling ?Quote from: "cormullion"
> (setf text_enc (encrypt "My name is Earl." "foobar")
"+ 22O 12 00 31 03O 06 17A7 07 29 03L"))
> (encrypt("My name is Earl.", "foobar")
043022079012000031003079006017065055007029003076
> (unpack (dup "c" (length str)) str)
(43 22 79 12 0 31 3 79 6 17 65 55 7 29 3 76)
(join (map (fn (x) (format "%03d" x)) (unpack (dup "c" (length text_enc)) text_enc)) )
> "043022079012000031003079006017065055007029003076"
> (join (map (fn (x) (pack (dup "c" 3) x)) (explode js_text 3)))
"Ѐ?0? 00 16 0@P`p???"
You could do a smaller library using those two files:Quote from: "Lutz"http://www.opensource.apple.com/source/CommonCrypto/CommonCrypto-7/Source/sha2.c?txt"> http://www.opensource.apple.com/source/ ... sha2.c?txt">http://www.opensource.apple.com/source/CommonCrypto/CommonCrypto-7/Source/sha2.c?txt http://www.opensource.apple.com/source/CommonCrypto/CommonCrypto-7/Source/sha2Priv.h?txt"> http://www.opensource.apple.com/source/ ... Priv.h?txt">http://www.opensource.apple.com/source/CommonCrypto/CommonCrypto-7/Source/sha2Priv.h?txt
gcc sha2.c -shared -o sha2.dylib
compiles without a problem on OSX to a sha2.dylib of about 29K