-
Notifications
You must be signed in to change notification settings - Fork 23
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
String Type in mpcl #17
Comments
I figured out the stringSize type and tried to run the following code as a test:
but it throws an exception
Can you guide why this happens? |
I want to import golang package like "fmt" and "hex/encoding" but it throws this error:
Any way to fix this? |
The string support is still very limited. I implemented cast operation from []byte to string The |
Thank you for your input. I guess the message is also handled in form of hex bytes. |
Hi, I'm trying to cast the msg param of Garbler struct, into string, but it does not seem to be working. Modified examples/hmac-sha256.mpcl file
These changes yield the proper HMAC Key for me. I encounter this error:
I have tried changing
Could you give insights on how I can make the message field dynamic accordingly? |
There has been quite many changes in the string type and type conversions lately. Could you please pull the latest version and test if the problem still persists. I tried you example on top of the master and it seems to work - but it always Works for Me(TM) :) |
Hi Mark, a recent pull and build solved my errors. Thank you so much! |
I am trying to convert a byte array to a hex string in mpcl. Here is the code from Sha256 HMAC. I saw a type defined as type
stringSize string
but didn't get any tests on this.In the code below I want to convert the variable key to a string and pass it to HMAC
hmac.SumSHA256([]byte("message"), []byte("abc"))
such that it looks like this:
hmac.SumSHA256([]byte("message"), []byte(string_key))
This was the code I wrote to convert byte array to hex string:
package main
but string is not accepted by mpcl. Can we write a package that handles this conversion?
The text was updated successfully, but these errors were encountered: