diff options
| author | Dennis Brentjes <d.brentjes@gmail.com> | 2016-08-26 11:21:41 +0200 |
|---|---|---|
| committer | Dennis Brentjes <d.brentjes@gmail.com> | 2016-08-26 11:21:41 +0200 |
| commit | 00ab2cf6add2976b3a4e8f8cc488777ad5c27808 (patch) | |
| tree | b9399bf912d949c289ff31edae8af2303dff7d26 /scratchpad | |
| download | cmix-00ab2cf6add2976b3a4e8f8cc488777ad5c27808.tar.gz cmix-00ab2cf6add2976b3a4e8f8cc488777ad5c27808.tar.bz2 cmix-00ab2cf6add2976b3a4e8f8cc488777ad5c27808.zip | |
Initial commit, just some ideas and testing.
Diffstat (limited to 'scratchpad')
| -rw-r--r-- | scratchpad/CMakeLists.txt | 9 | ||||
| -rw-r--r-- | scratchpad/scratchpad.c | 26 |
2 files changed, 35 insertions, 0 deletions
diff --git a/scratchpad/CMakeLists.txt b/scratchpad/CMakeLists.txt new file mode 100644 index 0000000..1109ca6 --- /dev/null +++ b/scratchpad/CMakeLists.txt @@ -0,0 +1,9 @@ + +add_executable(scratchpad + scratchpad.c +) + +target_link_libraries(scratchpad + PRIVATE cmix + PRIVATE cmix-crypto +)
\ No newline at end of file diff --git a/scratchpad/scratchpad.c b/scratchpad/scratchpad.c new file mode 100644 index 0000000..848493d --- /dev/null +++ b/scratchpad/scratchpad.c @@ -0,0 +1,26 @@ + +#include "cmix.h" +#include "message.h" + +#include <stdio.h> + +int main(int argc, char* argv[]) { + + struct CmixBufferImpl buffer_impl = get_cmix_Curve25519_buffer_implementation(); + char* buffer = buffer_impl.allocate_cmix_buffer(3); + + int message_size = buffer_impl.message_length(); + + for(int i=0; i < 3; i++) { + buffer[i*message_size] = 'h'; + } + + for(int i=0; i < 3; i++) { + putc(buffer[i*message_size], stdout); + putc('\n', stdout); + } + + buffer_impl.deallocate_cmix_buffer(buffer); + + return 0; +} |
