1. Java NIO select() returns without selected keys - why? stackoverflow.comIn writing some test code I have found that Selector.select() can return without Selector.selectedKeys() containing any keys to process. This is happening in a tight loop when I register an accept()ed ... |
2. How do I programmatically import a public key .cer file into a java keystore using JSSE? stackoverflow.comI want to take a public key .cer file generated from java keytool command like this: "keytool -export -alias privatekey -file publickey.cer -keystore privateKeys.store" and import it into a new, empty java ... |
3. How to read key=value file and how to split a comma-separated String? stackoverflow.comI made a config file it has some following format
I know I can read file split them store them in variable. But I am looking ... |
4. Use class name as root key for JSON Jackson serialization stackoverflow.comSuppose I have a pojo:
|
5. Java Selector select() always returns the last read key stackoverflow.comI am trying to write a TCP server that reads data sent by the client. I want to keep the client connection open after the read to be able to read ... |
6. How to Load RSA Private Key From File stackoverflow.comI am working on a test harness for a SAML 1.1 Assertion Consumer Service. The test must generate a signed SAMLResponse and submit it to the ACS encoded in Base64. ... |
7. How to convert .pfx file to keystore with private key? stackoverflow.comI need to sign Android application ( |
8. How to read public key from PFX file in java stackoverflow.comI am able to read private key from PFX file but not public key. I am using following code to read public key.
|
9. What are the key points to make sure while implementing serialization stackoverflow.comWhat are the key points in checklist to be checked while implementing good serialization in java (I'm not really looking for , implements Serializable, write, readObject etc). Instead , How to reduce ... |
10. How to encrypt a file in java using AES stackoverflow.comI need to know how to create an AES and using it to encrypt and decrypt a file in java. |
11. What is the default behaviour of a selector when the key set is sized 0? stackoverflow.comJust wondering what the normal behaviour of a |
12. exchange of public key as a serialized object stackoverflow.comHow to exchange the public key to the client place. i have encrypted a document(text file) using RSA algorithm by using private key and then stored the public key as an ... |
13. Java symmetric key file generation and use stackoverflow.comI'm working on a school homework, in which I'm sending files from one host to another. As a part of it, I need to encrypt the files being sent using symmetric ... |
14. problem reading a publickey file and use the key to encrypt another file stackoverflow.comI've been strugling with reading a publickey file which I want to get the key sting in the file and use it to encrypt another file. I'm using RSA PKCS1 v1.5 ... |
15. How to use .key and .crt file in java that generated by openssl? stackoverflow.comI need asymmetric encryption in java. I generate .key and .crt files with own password and .crt file by openssl that said in http://www.imacat.idv.tw/tech/sslcerts.html . |
16. Getting RSA private key from PEM BASE64 Encoded private key file stackoverflow.comI have a private key file (PEM BASE64 encoded). I want to use it else where to decrypt some other data.Using Java i tried to read the file and decode the ... |
17. Java: nio WatchService - Can't detect second file creation. Why? stackoverflow.comi am trying to detect file creation in a folder but WatchService can't detect second file creation. it stucks at key = watcher.take();. Any idea why? I am using Ubuntu 11.04 ... |
18. SSHJ Example of Public Key Auth from File stackoverflow.comCan someone give me an example of using SSHJ for Public Key Authentication? I realise this question is essentially identical to sshj example of private/public key authentication, however the answer ... |
19. In IntelliJ IDEA, how can I create a key binding that executes a shell script with the current file as a parameter? stackoverflow.comIn IntelliJ IDEA, how can I create a key binding that executes a shell script with the current file as a parameter? For exanmple, if I am in a test file (entity.spec.js), ... |
20. listening to two keys simultaneously coderanch.comi have written a key listener for the keypressed event. the problem is that when a key is pressed and held the listener does not respond to any other key pressed. i want different keys recognized independently and simultaneously.how should i use multithreading and event handling in this case? kindly note that i am using awt package in an applet. waiting ... |
21. Switching off a key coderanch.comDoes anybody know of any way to switch off a key (specifically the NUM LOCK key), via Java? I can get it to do all sorts of things but how do I get it to not do stuff? I've asked this question a couple of times already but I'm still waiting for the answer. I hope someone can point me in ... |
22. Reading keys as they are pressed, how? coderanch.comI need to read keys the moment they are pressed but most streams seem to wait for a "end of input" char or something. I've been told that it's possible with awt and swing, but I would rather not involve the gui stuff. So is there an easy way to do it? |
23. Manipulating large file containing key value pairs coderanch.comHi, I have a very large file which contains data with the below format key=value1,value2 key_value1=somedata1$somedata2 .... I cannot use database (like Oracle/Access etc.) but I could have a different file type like .xls etc. (this might change the data format, but it is ok). Can some one suggest me an efficient way to read and manipulate the file (like update, ... |
24. How to make program quit if user presses ESC key? coderanch.comNot easily done. You can't read a single key press off of the console in Java without resorting to native code. You can add a key listener to a GUI component but you will only get key presses if the component has focus. If you make a frame a key press listener and a button on the frame has the focus ... |
25. Selector returns set of keys which are already processed in loop before coderanch.comhi. i am facing problem as following: i have a Selector and a ServerSocketChanner with non-blocking configuration. now in main loop, i perform while(true) { int keysAdded = selector.select(); if(keysAdded == 0) { continue; } Set keysReady = selector.selectedKeys(); Iterator itrKey = keysReady.iterator(); while(itrKey.hasNext()) { selectedKey = (SelectionKey) itrKey.next(); itrKey.remove(); } } //end while Only single client is connecting to it ... |
26. Press any key to continue... coderanch.comIt may have been discussed many times, but the answer is always very simple: you can't do it. Furthermore, java.io.Console doesn't help: it only provides line-buffered-non-echoed reads for reading passwords, not any kind of general console-handling. There's a library called "JLine" out there that might do this; I'm not sure. It uses native code, as any solution would need to. |
27. Write [alt]-[enter] key combination to file coderanch.com |
28. Write [alt]-[enter] key combination to file coderanch.com |
29. Error while reading Key/ value pair fromprops from props file coderanch.com |
30. Retrieving key components by scanning through a document coderanch.com |
31. how would I go about reading more than one key at a time? coderanch.comYou can't read multiple keys at a time, since you only get one key per event. What you can do is store the keys that have been pressed: private Set |
32. Read out of focus key press coderanch.comHi, I am developing a simple application, where in, there is no UI involved. My java code will be running as a background process. I want to make the program such that, if the user presses the key anywhere i.e. on any window running on the system, my program will be triggered and it will record the key pressed. In short, ... |
33. RAS+public private key encrypt +decrypt+ file size larger coderanch.comDear friends, I am doing encrypting decrypting of any type files using My RSA+private key ,public key alogorithm in java. My issue is wheever i enctyprt any .tar files the size of the encrypted file is larger than the original .tar file. But encryption is ok and decryption also ok. Thanks Rakesh |
34. how to serialize a java.security.key coderanch.com sudheer kiran wrote:hi Ulf Dittmer, i cannot change map from map |
35. File decryption fails when using a key of bit size 2048 coderanch.comHello, File decryption fails when using a key of bit size 2048 & 4096 to encrypt/decrypt. File encryption works ok. The file size doesnt seem to matter. Im running some tests hence the large keys Also know that symmetric encryption is better for files.. See the exception thrown below: javax.crypto.BadPaddingException: Data must start with zero at sun.security.rsa.RSAPadding.unpadV15(Unknown Source) at sun.security.rsa.RSAPadding.unpad(Unknown Source) ... |
36. PGP encrypting using .asc public key file - encrypt String coderanch.comHi, I am trying to PGP encrypt a String object, I base 64 encode it and send it to our client. The person that is trying to decrypt it keep getting a "Secret key for message not found error. I copy pasted the code below as well as output: Any advice would be appreciated. //Java imports import java.io.BufferedReader; import java.io.ByteArrayOutputStream; import ... |
37. Err:java.io.IOException: public key ring doesn't start with public key tag java-forums.orgpublic static PGPPublicKey pgpCheck() { PGPPublicKey pkey=null; StringBuffer encoded64 = new StringBuffer(); try { BufferedReader rdr = new BufferedReader(new FileReader("C:\\key.txt")); String line = rdr.readLine(); while (line != null) { encoded64.append(line); line = rdr.readLine(); } rdr.close(); System.out.println("Result string is...\n" + encoded64.toString()); [COLOR="Red"] PGPPublicKeyRing keyring = new PGPPublicKeyRing(Base64.decode(encoded64.toString().getBytes()));[/COLOR] pkey = keyring.getPublicKey(); System.out.println("Public key: id - " + pkey.getKeyID()); System.out.println(" : Alg - " ... |
38. RAS+public private key encrypt +decrypt+ file size larger forums.oracle.comBy how much is the file size increasing? Depending on how you do the actual encryption, it can easily grow a bit due to varying headers and some padding, but it shouldn't be a significant part of the file size if the file is reasonably big. If, however, the file size grows by some significant factor (say your output is 2 ... |
39. Creating java.security.PrivateKey from a file containing Base64 encoded key forums.oracle.com |
40. RSA Reading Private Key from File forums.oracle.comstatic void FileEncryption ()throws Exception { Security.addProvider(new BouncyCastleProvider()); // Getting the path of the file to be encrypted System.out.print("Enter the filename to be encrypted\n(full path is needed if not located at the same directory): "); String FileName = null; BufferedReader brf = new BufferedReader(new InputStreamReader(System.in)); try { FileName = brf.readLine(); } catch (IOException IOE) { System.out.println("IO error trying to read your ... |
41. detect if a file is opened by clicking and hitting "Enter" key ? forums.oracle.comI am running a cyber cafe, aka CC, and the CC server software required that the user to login as administrator in order to run the CC server software. This CC software is using MS Access. The problem is that I afraid the operator of my shop open up the MDB file and change the data inside. But this MDB also ... |
42. extract and save to file certificate and key from pkcs12 file programmatica forums.oracle.com |
43. Write |
44. How to get random number from private key file 'PriKey.key'? forums.oracle.comHi! every java developers. Is there someone who know how to get random number(RandomNum) from private key file 'PriKey.key'? I know random number(RandomNum) is used to make private key. In my B2B project, I have to attach the random number(RandomNum) used in my private key to my soap message to make identification certification. But I don't know how to do it. ... |
45. Retrieving keys from config file forums.oracle.com- The configuration files in java are usually properties file, which are simply a list of key,value pairs. Property files does not support multiple sections. |
46. retreiving a private key from a file forums.oracle.com |