Conversation
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
811f9b7 to
e1644ba
Compare
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
|
@dborovcanin thank you, Душан! |
|
I'm curious - doesn't Lua support binary strings? Why do we need to pass strings as hex? |
|
Perhaps we can add the hex functions and then just pass a binary string… |
|
@scr-oath I used strings because of the limitations of |
|
I'm not quite sure I understand - strings support binary data. take a look at the base64 stuff… [scr@MacBook-Pro-3]$ go build ./cmd/glua-libs/...
[scr@MacBook-Pro-3]$ ./glua-libs -e 'base64 = require "base64"; io.stdout:write(base64.StdEncoding:decode_string("Zm9vAGJhcg=="))' | od -t x1c
0000000 66 6f 6f 00 62 61 72
f o o \0 b a r
0000007I was thinking that, since you can slurp in a whole file https://www.lua.org/manual/5.1/manual.html#pdf-file:read you might want to use that - and, with this, then you have to deal with converting it to hex… I'd rather clients could pass the binary data to it - and, if we need to add the hex go library to help with conversion, then let's do that - there's no reason to use a table - the string, itself, is not a C++ string - it supports Converting to "byte slice" is simply |
Add AES modes GCM, CBC, and CTR to the
cryptolibrary.