有没有办法使用指纹对网站进行身份验证?
我正在考虑以下场景。
然而,这似乎非常没有安全感。获取别人指纹的 jpg 并将其转换为相同的 ISO 19794-2 模板并不困难。然后,可以通过将用户 ID 和模板发送到网站来以编程方式登录网站。
是否有安全的算法/设计允许人们使用指纹登录网站?
I am trying to sign some data (a POST form) in a web based application using a Java Applet. The user's x509 certificate would be in a cryptoken/smart card. The signature needs to be in attached pkcs#7 format.
I am using this tutorial/code as a starting point in building the applet - http://www.developer.com/java/other/article.php/3587361/Java-Applet-for-Signing-with-a-Smart-Card.htm
The biggest problem for me here seems to be the fact that the applet asks the user for location of the pkcs#11 implementation library. This is a …
Oracle 建议使用该JnlpDownloadServlet 示例从 Web 应用程序启动 JNLP。
无论出于何种原因,我无法使用它,并且必须编写自己的 JNLP 启动代码。
这就是我想出的(启动它的 Servlet):
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
performTask(request, response);
}
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
performTask(request, response);
}
private void performTask(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
response.setContentType("application/x-java-jnlp-file");
byte [] b = getJNLP(..some params..).getBytes();
response.setContentLength((int) b.length);
OutputStream responseOutputStream = response.getOutputStream();
responseOutputStream.write(b);
}
Run Code Online (Sandbox Code Playgroud)
getJNLP是一种将整个 JNLP 文件作为String.
这似乎工作正常。但我错过了什么吗?是否有任何额外的标题等需要设置?
更新:我不使用 JnlpDownloadServlet 的原因是,我必须从 2 个不同的 Web 应用程序启动此 JNLP - …
Oracle建议使用JnlpDownloadServlet从Java Web应用程序启动JNLP - https://docs.oracle.com/javase/8/docs/technotes/guides/javaws/developersguide/downloadservletguide.html
但是,我需要使用来自dotnet应用程序的动态生成的JNLP文件启动JNLP应用程序.
启用此功能需要做什么?
将内容类型设置为application/x-java-jnlp-file
输出JNLP文件作为下载.
还有别的事吗?
我java.util.logging用于日志记录(我不想使用 log4j 或其他任何东西)。
这是我完整的私有 logging.properties:
handlers= java.util.logging.FileHandler
.level= INFO
java.util.logging.FileHandler.pattern = my.log
java.util.logging.FileHandler.limit = 500000
java.util.logging.FileHandler.count = 40
java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
Run Code Online (Sandbox Code Playgroud)
这是我程序中的代码:
public static Logger log = Logger.getLogger(MyClass.class.getName());
// Is there anything else to be init'ed here?
// I don't. I just start using log directly in the code.
log.severe("something");
log.info("something else");
Run Code Online (Sandbox Code Playgroud)
由于这在 2 行上给出了每个日志消息,我试过这个
完全复制了第一个回复中的 LogFormatter 类。
在我的 logging.properties 中更改了一行
java.util.logging.FileHandler.formatter = com.mycomp.myproj.LogFormatter;
Run Code Online (Sandbox Code Playgroud)
现在我的日志已经开始出现在 XML 中。我有一种强烈的感觉,FileHandler不喜欢我的com.mycomp.myproj.LogFormatter,因此默认为 default XMLFormatter。我如何找出为什么FileHandler …
我有一个 GitHub 博客页面。在博客页面中间的某个位置,我有一张图像,其中显示了以下 Markdown 内容。

Run Code Online (Sandbox Code Playgroud)
这可以很好地显示图像,但我还想添加一个段落(包裹在图像的右侧)来描述图像。我该怎么做呢?
Tomcat用于运行Java servlet,但它也内置了Web服务器功能,因此可以独立运行。但是,我看到几篇关于如何将 Apache Webserver 与 Tomcat 集成的文章?这样做的目的是什么?它会提高性能吗?
我使用 Tomcat 来提供 Web 服务。
我在我的职业生涯中使用了多个版本控制系统--ClearCase,PVCS,SCCS,Perforce,CVS,SourceSafe - 但之前从未使用过分布式系统.
我第一次使用分布式系统--Git.已经过了好几周 - 但我无法做出如何做事的头脑和尾巴.
一位同事创建了一个分支,并在分支机构中开展了一项小功能.我现在想要回顾他在该分支中所做的所有更改.我如何在TortoiseGit中执行此操作(我已将TortoiseGit连接到Windiff).
有没有办法看到在该分支上完成所有更改的风向?步骤是什么?
我有以下 Java 代码,我正在尝试用 C# 重写。
byte b = ...;
int i = Character.digit((char)b, 16);
Run Code Online (Sandbox Code Playgroud)
C#中是否有相当于Character.digit的东西
http://docs.oracle.com/javase/7/docs/api/java/lang/Character.html#digit(char,%20int)
返回指定基数中字符 ch 的数值。
import twint
import os, requests, re, time
c = twint.Config()
c.Username = <anyusername> #Replace with an actual uname in quotes
c.Store_object = True
c.Limit = 10
try:
twint.run.Followers(c)
except:
print("Unexpected error:", sys.exc_info()[0])
f = twint.output.follows_list
print(f)
Run Code Online (Sandbox Code Playgroud)
输出
CRITICAL:root:twint.feed:Follow:IndexError
[]
Run Code Online (Sandbox Code Playgroud)
完成了
pip install twint
pip install --upgrade -e git+https://github.com/twintproject/twint.git@origin/master#egg=twint
Run Code Online (Sandbox Code Playgroud)
谷歌搜索,很多人都遇到过这个错误 - 但我真的找不到解决方案
运行 twint 命令行也会出现同样的错误
twint -u <uname> --followers
CRITICAL:root:twint.feed:Follow:IndexError
Run Code Online (Sandbox Code Playgroud)
这不仅是追随者。我尝试任何操作,都会遇到类似的错误。
在 Windows 10
Twint上运行 Python 3.8.1 - 最新版本 - 2.1.21