I searched this forum and couldn't find anything that explained my exact situation so here it is....I am trying to decrypt some data and I end up with 0 bytes padded at the end. Any idea what I am doing wrong? Here is my decrypt() method:protected final byte[] decrypt( final byte[] key, final ...
409 byte By
av85a at 2007-11-27 4:51:16
Hi all,i want to decrypt a digital signature that is encoded with MD5withRSA algorithm with the padding as specified in rfc 2313 (pkcs#1v1.5). i also have the public key for decryption.can i use the Signature class in java with the string type "MD5withRSA" without specifing any provoder. Will ...
hi,I've a problem with cryptography: I'm trying to encrypt a string, put it in another string containing XML tags, send this XML by AJAX to a Servlet, and then decrypt the string.I can't send a byte char using AJAX, so I have to convert the result of the encryption with the .toString() ...
8380 byte By
CbbLea at 2007-11-27 4:52:18
I have a "pencil" function similar to the one in paint() where I press the mouse and it draws on a JPanel.However, pretty quickly it gets slow and the drawing can't keep up with the mouseDragged events. How can I make this faster?this is my class representing the pencil drawingfunction:import ...
I have this codeKeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA");keyGen.initialize(1024);KeyPair keyPair = keyGen.genKeyPair();PrivateKey priv = keyPair.getPrivate();PublicKey pub = keyPair.getPublic();SecretKeySpec skeySpecc = new SecretKeySpec(pub.getEncoded(), "AES");Cipher ...
489 byte By
oforcea at 2007-11-27 4:53:07
Well i am working on a paint program, i created the main frame gui, for entering parameters i created another jframe, since java does not have a close method, i just change the visiblity of the second frame to false and make it invisible.. the problem is that whenever i enter parameters to the ...
i make this code for move the playerimage falling down and when it touch the rectimage it stop and also the playerimage not on the rectimage it falling down again.But here is the problem the playerimage have stop when touch but it don't falling down again when the playerimage not on the image ...
2029 byte By
scuzziea at 2007-11-27 4:55:55
Hi all,I am trying to implement a client/server messaging scheme over a network socket.I have never performed any kind of encryption before, so this is my first try!I am currently trying to get it to work with the following scheme in order to establish communication using symmetric ...
298 byte By
JNooreza at 2007-11-27 4:56:15
Is it possible to use my own Policy implementation along side the default one? For an application I have permissions that have more properties then the "name" and "actions". But for the other permissions, I would like to use the default policy file implementation. Is there a way to do
Hi guys. Why runnuing a MediaPlayer in netbeans it works (I see the video) and if I exec it from command line I haveC:\Documents and Settings\emanuele\player\src>java -classpath .;lib\ext\mp3plugin.jar;lib\ext\jmf.jar;lib\ext\fobs4jmf.jar ...
I have a string password,I want to encrpyt password before keeping it in database,I don't konw how to realize RSA encrpytion method and how to encrpytion password with RSA method,is there a source code to realize this function?Thanks!Best regards,Edward
I need to translate the following C# code to java code:public static string Encrypt(string toEncrypt, string key, bool useHashing){byte[] keyArray;byte[] toEncryptArray = UTF8Encoding.UTF8.GetBytes(toEncrypt);if (useHashing){MD5CryptoServiceProvider hashmd5 = new ...
my problem is my playerIcon can auto falldown and it touch the rect the playerIcon stop but press left to walk out the rect it do not fall down again.i use theard do this (playerRect.y += dy) when touch Rect i do this (dy = 0)then it stop. how to make it falldown again when the playerIcon awlk ...
478 byte By
ardmorea at 2007-11-27 4:59:49
Many of today's applications use a multiple-document interface--a mainwindow (called the parent window) containing other windows (called child window), to manage several open documents that are being processed in parallel.What I confuse is the concepts of panel and frame.Is a parent window a ...
Hello you all!I have to rotate and scale an image, but i don't wont to deform it.I'm thinking to something like 16/9 images on 4/3 screens (with two horizontal or vertical black lines around the scaled image)...I thinked to transform the image in bitmap format, then create a bigger image and ...
Hello,I have configured tomcat to use SSL exactly defined in how-to doc of apache tomcat.but when i give URL https://localhost:8443 its simple says page cannot b displayed....and when clientAuth is set to true...In case if i set clientAuth as false then it says There is problem with website ...
When I want to delevery stream of media, I use the MediaString port = "22000";String ip = "192.168.1.3".;// this is the ip of the Target machine not of server machineMediaLocator ml = new MediaLocator ("rtp://"+ip+":"+port);Processor processor = Manager.createProcessor (ml);In this case I need ...
163 byte By
J-Buzza at 2007-11-27 5:01:48
I am wanting to convert EPS formatted image to JPEG.Is that possible with JAI, if not does anyone know of an API Callable solution?ThanksJason
How may I extract just the private key from the keystore entry of a public/private key pair originally generated by keytool -genkey ?I know how to extract the certificate (-export), but my understanding is that is only the public key.Thanks for help.
My scene is setup like this:* I have a 2D textured plane on z=0 from x,y=1,1 to x,y=-1,-1* There are a couple of objects located on the plane, basically pyramids, pointing upwards (to z+), but their base is at z=0, on the plane, during the course of the application they are moving across the ...
197 byte By
capea at 2007-11-27 5:05:10
i install fobs4jmf.and Fobs_jmstudio.exe worked well with mp4 as well as jmstudio.exe.but when i use some code to player mp4,it can't work.and it can work well with other format.why?
I am working on a pong-like game for a project... and i am having some trouble with collision checks... again.Here is our code so far, the problem is that the ball seems to be stopping completely when it is aligned with a paddle on the Y axis (even if it is at the center of the screen)import ...
Hi there,I'm having a problem verify a signature using my public key. I get the following error when I run call the method verifies from Signature object:Verifies = falseMy code below any help is much appreciated:public static void main(String[] args) throws Exception {FileInputStream fis = ...
2137 byte By
cup_joea at 2007-11-27 5:09:09
Hi,I'm trying to get a print out the public key as a String, which I am getting it in as a base64 encoded, but I get error:Exception in thread "main" java.lang.IllegalArgumentException: Illegal character in Base64 encoded data.Code below:public static void main(String[] args) {File pubKeyFile ...
hello there, topic says it all. is there any way to set the IP TOS field through jmf? im asking this to theoretically prioritize streams in the "Sip Communicator" ill be glad for any responses, thanks in advancekolja
Hi experts,I have configured HTTPS on my tomcat 4.1 web server.When I run tomcat as a console application it works fine, but when I run tomcat as a service it doesnt work.Please help me with this.ThanxDeepak
Hi, I would like to make a game as hobby in Java but have no clue of anything. Can anyone show me how to create and move the images? I don't know how to show an image in window but I do know about JComponents and actionListeners such as mouse and key. Thank you.
Hello,How can I use pure Java 5 classes to get the X509Certificate valid date (from date and to date) ?Can you give me a simple example?Best regards,Eric
169 byte By
SFLa at 2007-11-27 5:12:31
Hi,I need to draw a right-angled triangle; I searched the API and tutorial but couldn't find anything.How can I draw such a triangle?Thanks!
Hi AllI have code that runs as a stand-alone application. It makes a SOAP call to a server over HTTPS. My problem is that the same code fails on JBoss and I can't figure out why. My code belowSystem.setProperty("javax.net.ssl.keyStore", ...
Hi... experts. I've got a problem about Diffie-Hellman Key Exchange. Is that possible to actually exchange a secret session key via Diffie-Hellman Key Exchange? or the secret session key (g^xy) is actually generated after the exchange of g^x and g^y by the two parties? My project supervisor ...
777 byte By
andremoa at 2007-11-27 5:12:55
Hello, I want to read some jpeg images from a FTP server. Some files contains a xml comment at the beginning of the file. If i try to read the file with either ImageIO.read(..) or an ImageReader, an exception is thrown in the form: "Not a JPEG file: starts with 0x01 0x11". Each image throwing ...
Hi, Can anyone help me to resolve IllegalBlockSizeExceptionBelow here is the code i am using***************************************************************import com.opensymphony.webwork.ServletActionContext;import sun.misc.BASE64Decoder;import sun.misc.BASE64Encoder;import ...
115 byte By
kokilaaa at 2007-11-27 5:13:12
HiCan anyone say me how to extract disismlar frames from a videoThanks in advancekokila
322 byte By
ajkra at 2007-11-27 5:13:17
Dear alli need to retrieve private key from personal store of IE, so that i can sign any document. i know this can be done using sunMSCAPI provider using jdk1.6. but i am not able to retrieve keys. please let me know how to do it using jdk1.6.if possible post any code ...
ok ive gotCar car = new Car(100,100, 0.0);car.draw(g2);Car car1 = new Car(100,110, 0.5);car1.draw(g2);Car car2 = new Car(100,120, 0.25);car2.draw(g2);Car car3 = new Car(100,130, 1);car3.draw(g2);andimport java.awt.Graphics2D;import java.awt.Color;import java.awt.Rectangle;import ...
i developed a simple voip application using AVTransmit and AVReceive classes.i want to develop a simple multiconference application.for example 3 or 4 people will connect that server and they will see and hear each other.i dont know how to develop the server..if there are any one developed ...
I implemented a TrustStoreManager for an SSLServerSocket so that checkClientTrusted() returns if the cert is acceptable. But through debugging code I see that once checkClientTrusted() returns normally, it doesn't get invoked when a subsequent connection is made to the same server socket.This ...
helloI have a certificate already generate by the server and I do not know its alias, how I can make:- to export the server certificate from the certs keystore.with keytool: keytool -export -keystore "java.home"/lib/security/cacerts -alias jamie -file server.cerbut I had the error: alias does ...
Hello,what is the reason for acquiring certificates from a certificate authority like VeriSign. Why not just install your own certificate?If one creates a keystore by himself with the keytool, will that be a secure certificate?RegardsRen?
2768 byte By
kahinaa at 2007-11-27 5:17:00
Hi,I am using bcmail-jdk15-136.jar and bcprov-jdk15-136.jar (within Eclipse WTP-1.5.3 and jdk1.5.0_11)When I send an email with a file attachment it works fine but when I try to send an encrypted email with file attachment by adding the following statement it does not work :MimeBodyPart ...
189 byte By
rp123a at 2007-11-27 5:18:21
I am getting the following error while trying to launch a signed applet with JRE 1.6.0_01. It works fine on most of the machines. Any help, advise is appreciated.Thanks
308 byte By
williwa at 2007-11-27 5:19:04
I need to draw a line where some segments of the line is thicker than the rest.I can draw the lines, but I need some kind of smooth transition from thin line to thick and the other way around. I'm using generalpath and stroke to draw the lines.What is the best (easiest) way to do ...
2265 byte By
Klosea at 2007-11-27 5:19:05
Hello Everyone,Please help me out.I created the a code to get a https connection (eg: https://www.google.com)The following code works fine in jre 1.4.2_11 but when I post the code into jre 1.6.0_01-b06, I get the Exception:java.security.AccessControlException: access denied ...
608 byte By
jgalzica at 2007-11-27 5:19:46
Hi,I'm a newbie in regards to the Security APIs and I have need to have an instance of 'PrivateKey' passed off to an library I'm working with (GData to be specific). My public key was generated with OpenSSL and is a 1024-bit RSA key encoded in an X.509 certificate in PEM format. I also have ...
I'm trying to learn how to use the java2d api and I'm having a rough go of it.Currently, the following code should populate a jframe's container with some jcomponent's called 'card' (which basically draw a given image as a texture over a specified rectangle). Then you should be able to ...
i have two files: cert.spc and cert.pvk. i genereted cert.pfx. now i want to sign applet by using jarsigner: jarsigner -keystore cert.pfx -storetype PKCS12 applet.jar? - what alias?, but i haven't alias for certificate in keystore. how can i get it? or can i sign without alias and how? thank ...
helloI have a code it does not work and which enables to send an email via the server smtp.my problem it is that in my code I do not know how to negotiate the keys and the certificates of my server.String trustStorefile = "java.home"/lib/security/cacerts";String pwd = "changeit";String protocol ...
Hello,I work with the educatonal model robot scorbot er III and recently found an interface written in java for controlling it. When executing the code as "java Remote" in my Windows Xp operational system, I receive the foolowing errorException in thread "main" java.lang.NullPointerException: ...
Hello EveryoneI am working in a project where I must combine 2 image files:->The first one is an image that will contain a white rectangle, and some text (in black or in white).->The second one is a regular image The first one must merge over the second, and the text and the white ...