andreshsingh / bcrypt-react-native Goto Github PK
View Code? Open in Web Editor NEWA native implementation of bcrypt for react-native
License: MIT License
A native implementation of bcrypt for react-native
License: MIT License
Here's the code :
import BcryptReactNative form 'bcrypt-react-native'
export async function pswrdApiTest(email, plainPass){
console.log('PSWRD API FUNC START');
return await fetch( PSWRD_ROUTE(email) )
.then( response => response.json())
.then( async (json) => {
if ( json == null ) { return false; }
else {
console.log('Password : '+json.data)
const check = await BcryptReactNative.compareSync(plainPass, json.data);
console.log('Pass Check : '+check);
return check;
}
})
.catch( error => { console.error('Password Test Error : '+error); } );
}
Here's the output ::
Trying to build an Android app in React-Native, I'm using Expo for development.
Please how do I solve this ?
[!] CocoaPods could not find compatible versions for pod "bcrypt-react-native":
In Podfile:
bcrypt-react-native (from ../node_modules/bcrypt-react-native
)
Specs satisfying the bcrypt-react-native (from
../node_modules/bcrypt-react-native)
dependency were found, but they required a higher minimum deployment target.
Hi guys!
Is there any way to use this package to decrypt the hash?
This library's first example has the Hash function with parameters the opposite way round to other implementations:
This library:
const hash = await BcryptReactNative.hash(salt, 'password');
vs
var hash = bcrypt.hashSync("B4c0/\/", salt);
https://www.npmjs.com/package/react-native-bcrypt
and:
const hash = bcrypt.hashSync(myPlaintextPassword, salt);```
https://github.com/kelektiv/node.bcrypt.js
Is this intended?
I've been struggling to get a comparison to succeed with the sync function as was wondering if there's a simple parameter swap going on.
Trying to use the npm package via npm install in an expo application (running on IOS14)
running any methode from the package gives me the following error:
"e": [TypeError: null is not an object (evaluating 'BcryptReactNative.default.getSalt')
I am grateful for any ideas?
how to compare hash using compareSync ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.