Comments (5)
Hello,
libscapi is a library. In order to compile libscapi, please run at the root dir of libscapi the command make
.
Afterwards a library that called libscapi
will be created. Link to this folder and implement the primitive you need.
Lior
from libscapi.
Thank you so much for the explanation. I linked the libscapi.a to my project.
After that, in order to run the cryptographic hash, I wrote the following codes in qt creator:
I appreciate it if you could give me some hints on how to fix the errors and run this hash primitive.
Thank you for your help :).
Meanwhile, I have to mention that I created the input array 'in' and output array 'out' in the following form which I know might not be correct.
char in [2]={'a','b'};
int out[2];
from libscapi.
Please follow the functions signatures.
from libscapi.
I try to follow but I recieve this error:
‘const class std::vector’ has no member named ‘length’
which is related to the following codes:
hash->update(in, 0, in.length);
And these are my new codes:
#include </home/zeinab/libscapi/include/primitives/HashOpenSSL.hpp>
#include
#include
using namespace std;
int main(int argc, char* argv[]){
//create an input array in and an output array out
const vector in {'h', 'i'} ;
vector out;
//create an OpenSSL sha224 function.
CryptographicHash* hash = new OpenSSLSHA224();
//call the update function in the Hash interface.
hash->update(in, 0, in.length);
//get the result of hashing the updated input.
hash->hashFinal(out, 0);
return 0;
}
from libscapi.
Hello,
I think I found the problem, the code hash->update(in, 0, in.length);
should be converted to hash->update(in, 0, in.size());
.
In the following there are my codes with no error:
#include "primitives/HashOpenSSL.hpp"
#include
using namespace std;
int main(int argc, char *argv[])
{
//create an input array in and an output array out
const vector in {'h', 'e', 'l', 'l', 'o'};
vector out;
//create an OpenSSL sha224 function.
CryptographicHash* hash = new OpenSSLSHA224();
//call the update function in the Hash interface.
//void update(const vector<byte> &in, int inOffset, int inLen) override;
hash->update(in, 0, in.size());
//get the result of hashing the updated input.
hash->hashFinal(out, 0);
for(size_t i = 0; i < out.size(); i++){
std::cerr<<out[i]<<""; }
return 0;
}
from libscapi.
Related Issues (20)
- get error when following the Tutorials on https://biulibscapi.readthedocs.io/en/latest/quickstart.html HOT 6
- Cannot compile the code HOT 1
- Cannot build the examples HOT 12
- Cannot use DamgardJurik encryption HOT 1
- DamgardJurik Encryption Incorrect Results HOT 2
- Error using AND compositions for Sigma protocols
- libraries in lib does match makefile_lib command HOT 2
- Error making libscapi (libOTe) HOT 4
- Error Building SemiHonestYao MPC-Benchmark with libscapi HOT 1
- How to generate circuit using C++? HOT 4
- Error running a segment of the code of OTExample HOT 9
- Make examples error HOT 1
- Sometims, one test case failed. i.e., TrapdoorPermutation Case HOT 1
- Where is CommPartyTcpSslSynced defined?
- Get Segmentation Error when run ./libscapi_example.exe sigma 1 SigmaPrototocls/SigmaConfig.txt
- Unable to build libscapi HOT 1
- Cannot find the libscapi after successfully make
- Error while making the libscapi HOT 2
- Error While Linking with Cmake
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libscapi.