Skip to content
Drazail edited this page Jan 2, 2020 · 5 revisions

react-native-hash

a light weight native hashing solution for React Native.

Why another hashing solution?

with the existence of excellent libraries such as crypto, you may wonder why did we feel the need to write a new library. well, the problem arises when large streams of data need to be hashed (lets say to check the integrity of 100 megabytes of data).

we had to store big chunks of data on the JS side ( usually after sending them over the bridge which is a blocking operation within itself) and then perform some relatively complex operations on them (usually of the order Θ(n)) , this proved to be impractical.

so we had to run these operations on the native side ( using multiple threads at times) to eliminate any blocking of the UI thread, this is were this library came to play.

Topics