Coder Social home page Coder Social logo

Xamarin iOS issue about jose-jwt HOT 3 OPEN

dvsekhvalnov avatar dvsekhvalnov commented on May 18, 2024
Xamarin iOS issue

from jose-jwt.

Comments (3)

wickedw avatar wickedw commented on May 18, 2024

Hi,

Just came across the Library this week.
With current support for .Net Standard 1.4 we should hopefully be able to get this working for Xamarin.

We have just installed NUGET to an iOS project and get the same error as above.

We have then taken the source code and tried to create a Xamarin .Net Standard 2.0 project from it, see how it fits together.

When running it in a test iOS project, we get a "cannot find "bcrypt.dll" at runtime" error.

Could someone clarify what is BCrypt.dll and where it should reside (on the platform or even in the project)

If these cannot be used on Xamarin, how difficult is it to replace the native/Bcrypt.cs and Ncrypt.cs files which call out to b/ncrypt.dll with something like -

https://github.com/neoKushan/BCrypt.Net-Core

OR

https://github.com/BcryptNet/bcrypt.net

Sorry currently know little about crypto algos so cannot easily replace ourselves, but willing to have a look with more information.

Thanks for your help

from jose-jwt.

dvsekhvalnov avatar dvsekhvalnov commented on May 18, 2024

Hi @wickedw ,

bcrypt.dll/ncrypt.dll usually provided on Windows OS and contains Microfost Crypto Primitives implementations. jose-jwt itself using native interface to bcrypt.dll/ncrypt.dll for features that not directly available as managed (.net) interfaces. Examples can be generating ephemeral EC keys or AES GCM mode.

Where possible jose-jwt tries to stick to managed interfaces for broader compatibility. But even using .NET interfaces sometimes not enough, for instance on Linux OS some interfaces simply throws NotImplementedException.

Can't really say much about Xamarin compatibility cause i never used it myself. Are you running into given exception for some specific signing or encryption algos? May be you can just stick to something that implemented on Xamarin instead?

I haven't seen projects you mentioned before, will take a look.

from jose-jwt.

wickedw avatar wickedw commented on May 18, 2024

Hi dvsekhvalnov,

Thanks for the prompt reply. We figured it was a windows OS system dll, thanks for clarification.

I think ideally Xamarin would need a pure .net Standard implementation that did not rely on any native windows dlls. For example, bcrypt.dll does not exist on iOS / Droid so needs an equivalent replacement for each platform in order to make those bcrypt / ncrypt calls.

Let me have a look at some options offline and get back to you.

from jose-jwt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.