gpt4 book ai didi

java - Digital Persona one touch sdk-无法在java中执行验证

转载 作者:行者123 更新时间:2023-12-01 05:01:49 28 4
gpt4 key购买 nike

我使用小程序捕获了字符串形式的功能集。我需要将该字符串转换回字节并将其反序列化以匹配它。但我不知道哪里出了问题,因为它没有将模板与功能集进行比较。我已经为此奋斗了几个星期,请任何人帮助我。

//Converting string stored in db back to template:
byte[] byteArray = new byte[1];
byteArray = hexStringToByteArray(dbTemplate);
DPFPTemplate template = DPFPGlobal.getTemplateFactory().createTemplate();
template.deserialize(byteArray);

//Converting featureset string captured by applet
byte[] fsArray = new byte[1];
fsArray = hexStringToByteArray(ftsetstring);
DPFPFeatureSet features = null;
features.deserialize(fsArray);

//Comparing template with features acquired
DPFPVerification matcher = DPFPGlobal.getVerificationFactory().createVerification();
DPFPVerificationResult fresult = matcher.verify(features, template);

if (fresult.isVerified()) {

return "The fingerprint was VERIFIED.";

} else {
return "The fingerprint was NOT VERIFIED.";

我的错误在哪里???

最佳答案

我以前从未使用过 Digital Persona,但在任何 API 中,都是这样的:

        DPFPFeatureSet features = null;
features.deserialize(fsArray);

将导致NullPointerException。我试图查找如何正确使用该类,但您必须是 Digital Persona 的成员才能查看 javadoc。抱歉!

关于java - Digital Persona one touch sdk-无法在java中执行验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13301209/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com