-
Notifications
You must be signed in to change notification settings - Fork 44
Add AES support to crypto lib #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Dusan Borovcanin <[email protected]>
Signed-off-by: Dusan Borovcanin <[email protected]>
Signed-off-by: Dusan Borovcanin <[email protected]>
Signed-off-by: Dusan Borovcanin <[email protected]>
Signed-off-by: Dusan Borovcanin <[email protected]>
Signed-off-by: Dusan Borovcanin <[email protected]>
Signed-off-by: Dusan Borovcanin <[email protected]>
Signed-off-by: Dusan Borovcanin <[email protected]>
811f9b7
to
e1644ba
Compare
Signed-off-by: Dusan Borovcanin <[email protected]>
@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
0000007 I 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
crypto
library.