jce

How do I get javax.crypto classes such as javax.crypto.Cipher to work on a servlet with jboss?

时光总嘲笑我的痴心妄想 提交于 2019-12-02 18:35:27
问题 My application validates a license file in order for it to work. It does this by calling javax.crypto.Cipher.getInstance("DES","SunJCE") inorder to decipher the license key file. When I run my application locally everything works fine but when I deploy my application with jboss and get to the point where I want to validate the license file on the servlet, I get the following error: java.lang.SecurityException: JCE cannot authenticate the provider SunJCE at javax.crypto.Cipher.getInstance

Reading pkcs12 certificate information

帅比萌擦擦* 提交于 2019-12-02 17:43:37
I have a problem with reading certificate information. I want to read full information using java with bouncycastle library in Android programmatically. Now, i'm just using keytool command in console: >keytool -list -keystore 1.p12 -storetype pkcs12 -v Any suggestions? ilya.stmn I've found solution, the main idea is to cast certificate to x509, then get the SubjectDN and parse values. public class TestClass { public static void main(String[] args) throws Exception { KeyStore p12 = KeyStore.getInstance("pkcs12"); p12.load(new FileInputStream("pkcs.p12"), "password".toCharArray()); Enumeration

How do I get javax.crypto classes such as javax.crypto.Cipher to work on a servlet with jboss?

China☆狼群 提交于 2019-12-02 13:41:40
My application validates a license file in order for it to work. It does this by calling javax.crypto.Cipher.getInstance("DES","SunJCE") inorder to decipher the license key file. When I run my application locally everything works fine but when I deploy my application with jboss and get to the point where I want to validate the license file on the servlet, I get the following error: java.lang.SecurityException: JCE cannot authenticate the provider SunJCE at javax.crypto.Cipher.getInstance(DashoA13*..) at javax.crypto.Cipher.getInstance(DashoA13*..) Like I said, it works fine from command prompt

Activiti使用maven alfresco仓库问题处理

可紊 提交于 2019-12-01 06:53:39
环境 项目用到了Activiti工作流引擎。 项目使用maven进行依赖管理。 遇到问题 项目使用的activiti版本是5.13,但是maven中央库中是从5.14开始的。 从网上找到 https://maven.alfresco.com/nexus/content/groups/public/ 这个仓库包含5.13版本。 但是配置完该仓库,使用maven从里面下载的时候出现了异常。 java.lang.RuntimeException: Could not generate DH keypair 搜索解决方案 从网上搜,找到了: 这里 还有 这里 解决方法 下面内容摘自上述第二个搜索结果: Solution: The problem is “Prime size must be multiple of 64, and can only range from 512 to 1024″. The maximum-acceptable size that Java accepts is 1024 bits, this is a known issue http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6521495 . I tried using the Java Cryptography Extension (JCE)

Where to find Java 6 JSSE/JCE Source Code?

假如想象 提交于 2019-11-30 17:02:28
Where can I download the JSSE and JCE source code for the latest release of Java? The source build available at https://jdk6.dev.java.net/ does not include the javax.crypto (JCE) packages nor the com.sun.net.ssl.internal (JSSE) packages. Not being able to debug these classes makes solving SSL issues incredibly difficult. there: openjdk javax.net in the security group src/share/classes/javax/net src/share/classes/com/sun/net/ssl src/share/classes/sun/security/ssl src/share/classes/sun/net/www/protocol/https also on this page: src/share/classes/javax/crypto src/share/classes/com/sun/crypto

Where to find Java 6 JSSE/JCE Source Code?

血红的双手。 提交于 2019-11-30 16:35:55
问题 Where can I download the JSSE and JCE source code for the latest release of Java? The source build available at https://jdk6.dev.java.net/ does not include the javax.crypto (JCE) packages nor the com.sun.net.ssl.internal (JSSE) packages. Not being able to debug these classes makes solving SSL issues incredibly difficult. 回答1: there: openjdk javax.net in the security group src/share/classes/javax/net src/share/classes/com/sun/net/ssl src/share/classes/sun/security/ssl src/share/classes/sun/net

AES/CBC encrypt in Java, decrypt in Ruby

ⅰ亾dé卋堺 提交于 2019-11-30 15:49:25
I am trying to translate the following (working) Java code to Ruby. public static final String PROVIDER = "BC"; public static final int IV_LENGTH = 16; private static final String HASH_ALGORITHM = "SHA-512"; private static final String PBE_ALGORITHM = "PBEWithSHA256And256BitAES-CBC-BC"; private static final String CIPHER_ALGORITHM = "AES/CBC/PKCS5Padding"; private static final String SECRET_KEY_ALGORITHM = "AES"; public String decrypt(SecretKey secret, String encrypted) { Cipher decryptionCipher = Cipher.getInstance(CIPHER_ALGORITHM, PROVIDER); String ivHex = encrypted.substring(0, IV_LENGTH *

Bouncy Castle vs Java default RSA with OAEP

£可爱£侵袭症+ 提交于 2019-11-30 15:35:59
问题 Can someone explain to me why this code throws javax.crypto.BadPaddingException: Decryption error on the final line when it's decrypting the key? // Given an RSA key pair... KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA"); keyGen.initialize(2048); KeyPair keyPair = keyGen.genKeyPair(); PrivateKey privateKey = keyPair.getPrivate(); PublicKey publicKey = keyPair.getPublic(); // ... and an AES key: KeyGenerator keyGenerator = KeyGenerator.getInstance("AES"); keyGenerator.init(256);

Java SE strong cryptography for Java 7? [closed]

你。 提交于 2019-11-30 14:04:44
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . The preview release of Java 7 seems to be missing JCE package for unlimited cryptography strength. Has someone stumbled upon such? 回答1: http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html 回答2: You need to install the missing JCE package. Locate your jre lib/security directory $

Encrypting data with Objective-C and decrypt it with Java Problem

巧了我就是萌 提交于 2019-11-30 10:38:27
I have an iPhone solutions that uses XML to transmit data between the client (mobile) and the server (Java). Some of the parts of the message (XML) must be encrypted because of the type of information transmitted. I planned to use AES 128 to encrypt and decrypt the data between these two endpoints. First the sensitive data is encrypted using Object-C's CommonCrypto framework, and then the data is decrypted inside a Java Server (Servlet). I'm new to security protocols and standards, and basically my code is a subset of group of informations that I could gather on Apple's dev forum/resources,