osamaqarem / react-native-freeotp Goto Github PK
View Code? Open in Web Editor NEWGenerate the same TOTP tokens as FreeOTP from your React Native app.
License: MIT License
Generate the same TOTP tokens as FreeOTP from your React Native app.
License: MIT License
After upgrading to Xcode 14 me and my team have experience issues developing with the iOS Simulator due to a fatal crash.
The crash occurs when generating the code in the following lines:
// ios/Core/OTP.swift ~ func code ~ line 121
let msk = UnsafePointer<UInt8>(buf).advanced(by: off).withMemoryRebound(to: UInt32.self, capacity: size/4) {
$0[0].bigEndian & 0x7fffffff
}
Additionally in Xcode that line shows the following compilation warning: "Initialization of 'UnsafePointer' results in a dangling pointer".
Based on this commit replacing that lines with the ones of the commit solves the problem.
// Fix
let bin_code = Array(buf[off...off + 3])
var msk = bin_code.withUnsafeBytes {
$0.load(as: UInt32.self).bigEndian
}
msk &= 0x7fffffff
I've already tested the fix and I'll submit a pull request with the changes.
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.