Comments (1)
Okay after more debugging we could solve these Assertion issues.
It turned out that instead of a pointer a NSMutabledata Object was given, that caused the v8 runtime to fail.
TypeScript header definition objc!sodium.d.ts:271
declare function crypto_box_easy(c: string, m: string, mlen: number, n: string, pk: string, sk: string): number;
C header definition crypto_box.h:60
SODIUM_EXPORT
int crypto_box_easy(unsigned char *c, const unsigned char *m,
unsigned long long mlen, const unsigned char *n,
const unsigned char *pk, const unsigned char *sk)
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
TypeScript call in index.ios.ts:370:392 - we had to return bytes pointer for the keys here
crypto_box_easy(outData.mutableBytes, rawMsg.bytes, rawMsg.length, rawNonce.bytes, public_key.bytes, private_key.bytes);
For the other assertions this applied as well and additionally we had to add the interop.Reference wrapper for the pointer.
TypeScript header definition objc!sodium.d.ts:177
declare function crypto_auth_keygen(k: interop.Reference<number>): void
C header definition crypto_auth.h:39
SODIUM_EXPORT
void crypto_auth_keygen(unsigned char k[crypto_auth_KEYBYTES])
__attribute__ ((nonnull));
TypeScript call in index.ios.ts:526 - we wrapped it in an interop.Reference and returned bytes
let rawKey = NSMutableData.dataWithLength(crypto_auth_keybytes());
crypto_auth_keygen(new interop.Reference(rawKey.mutableBytes));
crypto_auth(out.mutableBytes, rawMsg.bytes, rawMsg.length, rawKey.bytes);
from ios.
Related Issues (20)
- V8 base:OS:Abort on v 8.2.3
- Garbage pointer dereference using v 8.2.3 HOT 2
- "libXML2 not found" when building metadata generator HOT 3
- When trying to generate metadata, fatal error: 'clang/AST/DeclBase.h' file not found HOT 2
- Crash in tns::compareIdentifiers (EXC_BAD_ACCESS / KERN_INVALID_ADDRESS) in simulator
- Missing dSym for release 8.3 HOT 1
- Build error - Bitcode not enabled
- npm package increased from 87.6 MB to 290 MB since v7 and introduction of multi-architecture support HOT 1
- Metadata generator fails to generate proper types and does not add method to runtime
- Question on declarations generation HOT 4
- Xcode 14.3 HOT 3
- iOS Crash when trying to use Sqlite via workers on iOS platform 8.5.0+ HOT 2
- Cannot connect debugger to emulator with iOS13.7 HOT 2
- Build input file cannot be found: '.../Build/Products/Debug-iphonesimulator/metadata-arm64.bin'.
- Timezone changes are not correctly applied to NS runtime HOT 8
- IOS: calling exit(0) results in "Appname Crashed" error message HOT 11
- IOS remove app from tray (error) HOT 4
- Build Failed Nativescript with error of metadata
- Symbol not found HOT 1
- @nativescript/ios alpha.0 Error: Unable to generate metadata for x86_64 HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ios.