问题标签 [javax.crypto]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
java - java.lang.SecurityException: Cannot set up certs for trusted CAs (JBoss AS 7)
(Using eclipse)
I am using classes from a JAR provided by a third party. The third party JAR has the line:
When this line gets executed, it throws the following stack trace:
Previously, I accessed this JAR by pasting it into a folder in my eclipse project, then adding the JAR to my build-path and deployment assembly.
However, because we want two different deployments to use the same instance of an object initialized from this third party jar, the decision was made to move the third party JAR into a JBoss AS 7 "module"
We maintained the reference to the JAR in the project within the build path, but removed it from the deployment assembly. I also added a "Dependencies: com...[the path specified in the module]"
This appears to have worked, as the project will build and deploy.
However, whenever I attempt to call a method which has been called hundreds of thousands of times already, I get this exception.
The exception appears to be getting thrown during the static initialization of SunJCE_b.class, but i'm not sure at all.
Here is the stack at the time that the first SecurityException gets thrown:
I can't find any references to javax.crypto.b.e() online.
How is it that previously this worked, but when I turned it into a JBoss module, it stopped working?
Also, how can I resolve this issue?
java - 为什么我得到包 javax.crypto 不存在
当我使用编译一个类时,javax.crypto.Mac
我得到这个错误信息?
包
javax.crypto
不存在
jre/lib/jce.jar
我可以通过包含在我的编译类路径中来修复它。
为什么jce.jar
不在默认的 jdk 类路径上? jre/lib/rt.jar
在类路径上,并包含其他javax
包,但 jce 似乎很特别?
java - Java解密
我有一个问题
当我写这行代码时
控制台给我这个错误
前两行代码是正确的,但是当我将 byte[] 类型的属性“text”传递给 doFinal 函数时,它给了我错误。
有人能告诉我为什么吗?
解决了:
好的,问题解决了
这是我写的正确代码
character-encoding - Clojure SHA256 HMAC 函数未产生预期结果
我有以下 Clojure 代码:
当我sign
在 REPL 中使用该函数时,会输出奇怪的字形:
而我期望f7bc83f430538424b13298e6aa6fb143ef4d59a14946175997479dbc2d1a3cd8
按照https://en.wikipedia.org/wiki/Hash-based_message_authentication_code#Examples_of_HMAC_.28MD5.2C_SHA1.2C_SHA256.29
这无疑是一个字符串编码问题,但我对编码知之甚少。任何人都可以帮忙吗?
android - 如何在android中使用特殊字符加密字符串?
我需要加密用户名和密码并对它们进行编码并通过 SOAP 标头发送。我使用DES算法加密明文`
在运行时我得到一个异常:
javax.crypto.BadPaddingException:给定
java - 更多的 AES 迭代导致 OutOfMemory Java 堆空间
在我的程序中,我试图用 AES 加密纯文本,至少进行 50 次迭代。但问题是我收到了 OutOfMemory 错误。从帖子中,推荐的迭代次数......我知道 LastPass 使用了 100,000 次迭代。但是我什至不能为 AES 使用 50 次迭代。
这是代码,
我知道 usingBase64Encoder
会发出警告。所以请不要发布有关它的信息。我稍后会改变它。
我的问题是有没有办法增加迭代而不会出现这个错误?
对不起,如果这是一个愚蠢的问题,任何答案表示赞赏。提前致谢。
这是异常日志,
这是打印的 valueEnc (只是其中的一部分)
java - javax.crypto JDK源代码,再次
我一直在寻找 javax.crypto JDK 源代码,但找不到。这要么是由于我无法搜索,要么是代码不可用的原因(JDK应该是开源的,对吧?)。我的猜测是当前的 jdk javax.crypto 有一个 NSA 授权的后门,这使得开源发布变得尴尬。
我的问题如下:
- jdk javax.crypto源代码在哪里?
- 如果我相信 jdk javax.crypto 源代码不可用,我如何检查我对它包含后门的担心是否合理?
java - PBKDF2WithHmacSHA512 对比。PBKDF2WithHmacSHA1
我正在研究一个 Java 身份验证子系统,该子系统将数据库中的密码存储指定为生成的PBKDF2
哈希值,我现在正试图决定是否应该使用SHA1
或SHA512
作为 PRF。我浏览了两者的规格,但它们在数学上对我来说非常密集。有更好的加密理解的人能解释一下有什么PBKDF2WithHmacSHA512
不同PBKDF2WithHmacSHA1
吗?
这是我正在尝试做的事情:
java - 如何导出对称加密密钥?
我正在尝试javax.crypto
在我的应用程序之间实现加密(通过 intnets)。我遵循这个(接受的答案):https://stackoverflow.com/questions/4319496/how-to-encrypt-and-decrypt-data-in-java。问题是据我所知,我需要SecretKeySpec key
两者都相同我的应用程序以加密/解密数据。我不知道如何导出它(作为字符串或任何东西),然后在我的两个应用程序中对其进行硬编码。