Comments (7)
@phileo Any chance you could post your CryptoAPI23ReprintModule? I'm looking for exactly the same thing.
from reprint.
I'll answer your second question first: By default, Reprint uses the spass module if it's available. It looks like newer samsung devices don't support it, and use the marshmallow module instead.
w.r.t. the CryptoObject
: I initially chose not to expose it in the Reprint since it's only applicable to the marshmallow module. I suppose the best solution would be to add an authenticate
overload that takes a support library CryptoObject
and passes it to the modules. But in the case that you're using a module that doesn't support it, what should the behavior be? It feels bad to throw an exception in the spass module when it gets a CryptoObject
, but is authenticating the fingerprint without unlocking the CryptoObject
useful?
from reprint.
I wound up creating a new ReprintModule that extends MarshmallowReprintModule
.
I name it CryptoAPI23ReprintModule
, and pass in the CryptoObject
as one of the constructor parameters.
Then following the pattern of MarshmallowReprintModule
, I implemented a private auth method which calls fingerprintManager.authenticate()
with the CryptoObject
I also need to pass the CryptoObject back to the user, so the easiest way to do this without perturbing the library was to create a new abstract class which implements AuthenticationListener
. Then I call this abstract class as follows in CryptoAPI23ReprintModule
's
FingerprintManager.AuthenticationCallback.onAuthenticationSucceeded()
callback :
listener.setCryptoObject(result.getCryptoObject())
This works for my purposes. However, I'm not sure whether this is too custom of a solution, or whether it is generic enough to be included into your Reprint library.
Let me know what you think.
from reprint.
I'm glad you found a solution that works! What do you do in the case when you're on a device that uses the SPass module, which doesn't support the CryptoObject
?
from reprint.
hmmm..... I'm currently just calling Reprint.registerModule()
and passing in my CryptoAPI23ReprintModule
so my I'm not sure what to do in that scenario. Also I never really addressed your question about authenticating the fingerprint without unlocking the CryptoObject in the case of a device using the SPass module.
What would you suggest?
Should I create a Reprint.initializeWithCrypto()
that checks whether I'm on a device that uses the SPass module, and if not, then call registerModule(CryptoAPI23ReprintModule)
?
from reprint.
Ah, so you aren't using the spass module at all? Your design makes sense in that use case. Let me think more about a general solution. In the mean time, I'll leave this issue open, and if anyone else has a use case for the CryptoObject
, they can comment on this issue to let me know what they'd like to see.
from reprint.
I am also looking for CryptoObject. And this library seems to be most updated.
from reprint.
Related Issues (20)
- Working only after resuming from standby HOT 9
- No support fingerprint HOT 4
- Restart fingerprint authentication onsuccess HOT 7
- IllegalStateException in MarshmallowReprintModule.java HOT 8
- Create a method that detects fingerprint changes HOT 5
- NO_HARDWARE with Galaxy Note 4
- Samsung module HOT 1
- spass startIdentify or startIdentifyWithDialog HOT 1
- AGP 3.2.0-alpha18 Error HOT 2
- Use with Gradle 3 "implementation" (instead of compile) HOT 5
- its not working in service but in activity its working fine HOT 4
- BiometricPRompt support and Spass version 1.2.6 HOT 14
- NoClassDefFoundError CancellationSignal HOT 3
- Failed to transform file 'reprint_spass-3.2.1.aar' HOT 1
- Also Use USE_BIOMETRIC Permission HOT 7
- Face authentication HOT 9
- Listeners should be set to null after calling onFailure or onSuccess to avoid memory leak HOT 3
- onFailure immediately called on some devices HOT 3
- Fatal Exception: android.content.res.Resources$NotFoundException HOT 1
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 reprint.