Skip to content
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

Link cpp library with swift #7

Open
24Lathiya opened this issue Sep 6, 2022 · 8 comments
Open

Link cpp library with swift #7

24Lathiya opened this issue Sep 6, 2022 · 8 comments

Comments

@24Lathiya
Copy link

I would like to link the Tink cpp library with the swift code. I want to use Streaming AEAD in swift which does not support Obj-C. If anyone has an idea please let me know.
Thanks in advance.

@tholenst
Copy link
Contributor

tholenst commented Feb 10, 2023

Do you plan to build the Tink CPP library?

Edit: You will have to build the CPP library yourself as we don't provide binary artifacts for CPP at the moment.

We do this with Bazel (and we recently fixed ObjC so it actually compiles everything directly).

@tholenst
Copy link
Contributor

tholenst commented Mar 1, 2023

Please reopen this if this is still an issue. AFAICT this should be possible.

@tholenst tholenst closed this as completed Mar 1, 2023
@24Lathiya
Copy link
Author

Streaming AEAD is not supported in the objective-c language.

I've tried the steps below, but I'm not getting any results.

Extract the Tink source code after downloading it.

Change path in terminal : cd /Users/WsTushar/Downloads/tink-master/cc
bazel build -c opt --ios_multi_cpus=armv7,arm64 --xcode_version=15.1 --ios_sdk_version=17.2 //:mac

@tholenst can you please provide brief information about how to do with Bazel commands?

@tholenst
Copy link
Contributor

tholenst commented Jan 4, 2024

I'm unfortunately not very familiar with Objective C, so it is difficult for me.

However, you should be able to consider our objective C library as an example: it wraps around C++ and you could do the same. Let's consider an example:

  1. To create a Mac in objective C, people use the function at https://github.com/tink-crypto/tink-objc/blob/main/Tink/TINKMacConfig.h#L49, resp. https://github.com/tink-crypto/tink-objc/blob/main/Tink/mac/TINKMacFactory.mm#L35

  2. The BUILD.bazel file looks like this: https://github.com/tink-crypto/tink-objc/blob/main/Tink/BUILD.bazel#L535

  3. For this, we set up the WORKSPACE using Tink: https://github.com/tink-crypto/tink-objc/blob/main/WORKSPACE#L8C1-L14C1

Does this help?

@24Lathiya
Copy link
Author

I think if objective-c library will support Streaming AEAD functionalities then it will be more appreciable.

@tholenst
Copy link
Contributor

tholenst commented Jan 4, 2024

Unfortunately, we simply do not have the possibility of adding StreamingAEAD to Tink Objective C at the moment.

StreamingAEAD is a difficult primitive, and designing a good API for it requires a lot of language specific knowledge which we don't have at the moment. I personally am not even willing to reviewe a proposal, since my knowledge of Objective C is just too limited.

@morambro morambro transferred this issue from tink-crypto/tink Jan 26, 2024
@24Lathiya
Copy link
Author

@tholenst @morambro Thanks for your reply. I wish StreamingAEAD functionality will be added soon in Tink Objective C.

@24Lathiya
Copy link
Author

@tholenst @morambro Are there any other ways to get Streaming AEAD methods in iOS?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants