AES padding issue

1508 byte By tony.thompsona at 2007-11-27 4:50:45
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 ...

DigitalSignature Algorithms

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 ...

problem decrypting a string

521 byte By valerio_arnaboldia at 2007-11-27 4:52:06
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() ...

My pencil (drawing program) is too slow!

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 ...

Exception when using Cipher

653 byte By eng.aymana at 2007-11-27 4:52:32
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 ...

Preventing disappearance of the drawings?

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 need help~

10152 byte By nickgoldgodla at 2007-11-27 4:53:40
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 ...

Encryption scheme advice please!

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 ...

Using my own policy implementation along side default

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

media player problem

739 byte By emanuele.ga at 2007-11-27 4:57:32
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 ...

How to realize encrpytion string with RSA method?

282 byte By EdwardKinga at 2007-11-27 4:58:03
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

Password encryption

1758 byte By nizarhandala at 2007-11-27 4:59:04
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 ...

i have a little problem

9973 byte By nickgoldgodla at 2007-11-27 4:59:47
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 ...

A basic Gui designing concept

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 ...

Rotate and scale an image witohout deforming it

461 byte By Don_Fabrizioa at 2007-11-27 5:01:27
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 ...

Prob in config tomcat to use SSL

883 byte By hetal_giria at 2007-11-27 5:01:36
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 ...

The diference between MediaLocator and DataSource to create Processor

917 byte By dreampeppers99a at 2007-11-27 5:01:37
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 ...

EPS Conversion.

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 to extract Private key from keystore entry using keytool ?

271 byte By BCScomputersTXa at 2007-11-27 5:01:58
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.

Translating viewplatform causes trouble

4522 byte By logophobiaa at 2007-11-27 5:03:12
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 ...

Player can play mp4 if i install fobs4jmf?but

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?

help with pong collision

21732 byte By omgitsadama at 2007-11-27 5:08:43
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 ...

Signature failed to verify

3820 byte By jana.nguyen@gmail.coma at 2007-11-27 5:09:05
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 = ...

Illegal character in Base64 encoded data

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 ...

Manipulating the IP TOS field through java media framework

237 byte By mrlindermana at 2007-11-27 5:09:24
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

HTTPS on tomcat4.1 doesnt work when run as a service

249 byte By deepak@stara at 2007-11-27 5:10:19
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

creating and moving images

270 byte By jeevan25a at 2007-11-27 5:10:48
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.

X509Certificate valid date problem

188 byte By EricMacau@Macaua at 2007-11-27 5:11:29
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

Drawing a right-angled triangle

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!

SOAP SSL handshake fails on JBoss

1967 byte By alfred.rsaa at 2007-11-27 5:12:45
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", ...

About Diffie-Hellman Key Exchange Algorihtm

442 byte By justin581209a at 2007-11-27 5:12:47
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 ...

Reading JPEG with comments

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 ...

IllegalBlockSizeException while using DES encryption

3556 byte By vishal2007a at 2007-11-27 5:13:03
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 ...

extracting frames from video

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

how to retrieve private key from internet explorer

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 ...

rotate help

2371 byte By Didge1987a at 2007-11-27 5:14:28
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 ...

multiconference server

377 byte By ali_velia at 2007-11-27 5:14:35
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 ...

Does an SSLServerSocket cache the trusted certs?

1044 byte By MidnightJavaa at 2007-11-27 5:15:11
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 ...

trust the server's certificate

411 byte By salim1981a at 2007-11-27 5:16:28
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 ...

SSL Certificate

273 byte By Innflow_Guenthera at 2007-11-27 5:16:37
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?

CMSException: Malformed content

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 ...

java.util.ConcurrentModificationException when launching aa signed applet .

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

Drawing line from thin to thick

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 ...

Https connection stopped working

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 ...

How to load an RSA private key from a file?

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 ...

Need help making my images drag more smoothly

6396 byte By doubleagenta at 2007-11-27 5:20:35
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 ...

how can i get alias from pfx keystore?

319 byte By crichtona at 2007-11-27 5:22:11
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 ...

customer SSL for smtp

2616 byte By salim1981a at 2007-11-27 5:22:31
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 ...

Error in java code for controlling scorbot

793 byte By Theodorosa at 2007-11-27 5:24:40
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: ...

Image Merger

484 byte By dantevaza at 2007-11-27 5:25:15
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 ...