1

I'm working with unity3d and I need to encode a payload with JWT encryption and send it to a server. Have been using Jose library and everything works perfectly in unity3d editor, the problem starts when I compile to android, I get this error:

bcrypt.dll assembly: type: member:(null)

So I have tried to understand what is going on and why it fails so i have replaced the dll with the actual Jose source code and noticed it using [DllImport("bcrypt.dll")]. This bcrypt.dll is a Microsoft windows DLL and i guess it importing it from windows or something and I have tried to copy this dll to unity3d plugin folder, renamed it to bcrypt1.dll and change the import to [DllImport("bcrypt1.dll")]. Tested and it fully working with this new dll inside unity3d editor, but when I compile to android I get a new error but is basically says the same:

Unable to load DLL “bcrypt1.dll”. Tried the load other following dynamic library bcrypt1.dll  because of ‘Failed to open the requested dynamic library (0x060000) dierror() = diopen failed: library “bcrypt1.dll” not found.

Perhaps the library is being stripped from the code on complication, so i have played with creating a new link.xml file and stated there to not strip this dll but to no avail. This how it looks:

<linker>
      <assembly fullname="bcrypt1" preserve="all"/> 
</linker>

Im pretty sure im missing something simple as im not experienced with importing external dll inside the project. Would love to get any information that will bring me an extra step to the solution. Thank you!

mindblast6
  • 43
  • 1
  • 6

0 Answers0