Skip to content
Snippets Groups Projects
Commit 4467fdac authored by Vladislav Shpilevoy's avatar Vladislav Shpilevoy
Browse files

crypto: implement crypto libary

OpenSSL API is quite complex and hard to follow, additionally it
is very unstable. Encoding/decoding via OpenSSL methods usually
consists of multiple calls of a lot of functions. This patch
wraps OpenSSL API with one more easy to use and conforming
Tarantool code style in scope of crypto library.

The traditional OpenSSL API is wrapped as well in a form of
crypto_stream object, so OpenSSL API is not cut off.

Besides struct crypto_stream the library provides struct
crypto_codec which encapsulates all the steps of encryption logic
in two short functions:

    crypto_codec_encrypt/decrypt(iv, in, in_size, out, out_size)

A caller can create a needed codec via crypto_codec_new, which
now supports all the same algorithms as crypto.lua module.

Needed for #3234
parent 0c718345
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment