User Profile

Collapse

Profile Sidebar

Collapse
nickyeng
nickyeng
Last Activity: May 21 '10, 09:56 AM
Joined: Nov 20 '06
Location: PJ,Malaysia
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • nickyeng
    started a topic 2ways ssl not working: bad certificate
    in Java

    2ways ssl not working: bad certificate

    I created one simple test java application to connect to a web service over HTTP/SSL.

    The webservice provider given us 3 certificates for testing purpose:
    1. Client Test Certificate with private key: abctest.p12
    2. Client Test Certificate with public key: abctest.cer
    3. Provider Test Certificate with public key: abc.cer

    I've added these 3 certificate into "cacerts" truststore using java 'keytool'....
    See more | Go to post
    Last edited by Niheel; May 21 '10, 04:39 AM. Reason: spelling, punctuation

  • nickyeng
    started a topic SSL Connection: timed out
    in Java

    SSL Connection: timed out

    Hi

    My program needs to connect to https server and here is my java code:
    Code:
    URL server = null;
    HttpURLConnection conn = null;
    try{
          System.setProperty("javax.net.ssl.keyStore", "eejis.jks");
    	System.setProperty("javax.net.ssl.keyStorePassword", "ee123");
    
         server = new URL("https", "123.123.1.1", 1234, path);
    ...
    See more | Go to post

  • nickyeng
    started a topic J2ME SMS Permission

    J2ME SMS Permission

    i have a simple application that send sms.

    i downloaded it using my k610i Sony Ericsson.
    I send sms using that simple application, default it ask me permission to allow messaging EACH time.

    So i exit application, and select application, -> More -> Permissions -> Messaging -> Never Ask (there are No, Always Ask, Ask Once, Never Ask)

    after that, i run application and send sms. It works...
    See more | Go to post

  • nickyeng
    replied to convert string to byte[]
    in Java
    you're talking like talk pointless.

    if everyone could analyze the question, then we don't need to come here and post question tho.

    anyway, thanks....
    See more | Go to post

    Leave a comment:


  • nickyeng
    replied to convert string to byte[]
    in Java
    i found code from website eventually that helps me with that.

    thanks for your time tho.

    NickyEng
    See more | Go to post

    Leave a comment:


  • nickyeng
    replied to convert string to byte[]
    in Java
    it doesn't work in j2me application.

    i've tried.

    any method to do that?...
    See more | Go to post

    Leave a comment:


  • nickyeng
    replied to convert string to byte[]
    in Java
    somehow look like this:

    Code:
    String str = "[@B43f";
    
    byte[] b = str.clone();
    
    System.out.println("b = " + b);   // if this value is [@B43f, then means this is what i want.
    but i'm not sure whether this is the way of doing it cos i dont have Eclipse or jdk in my pc here.
    See more | Go to post

    Leave a comment:


  • nickyeng
    replied to convert string to byte[]
    in Java
    i know.

    maybe the way i explain is confusing but the string is [@B43f.

    decryptString(b yte[] b) takes byte[] as argument.

    So i have to make "[@B43f" to byte[] first, and then pass to decryptString(x x) method.

    but i dont know how to make a string to byte[] without changing the value(in this case is [@B43f ) so that the string is [@B43f and the byte array is also [@B43f.
    ...
    See more | Go to post

    Leave a comment:


  • nickyeng
    started a topic convert string to byte[]
    in Java

    convert string to byte[]

    I have this simple question but i dont know which method to convert it..

    the case is like this:

    i have encrypted a string in byte[] form.

    and since it is a string already, but in the end i still need to decrypted it back to original string. for example:

    Code:
    String str = "Peter is smart";
    
    // encrypt it
    byte[] data = enc.encryptString(str);
    ...
    See more | Go to post

  • nickyeng
    started a topic convert back to original string
    in Java

    convert back to original string

    The following code i search some where from websites.

    it generate hash value for a string.

    but is that possible that convert it back to original string ?

    like if the string is "this is string" and hash value is "dje3h344h3hk4w 9sjs" (just an example)...

    so how i'm going to make the hash value back to original string ?
    can anyone help ?
    i am a noob on...
    See more | Go to post

  • nickyeng
    started a topic MySql Connection Issue

    MySql Connection Issue

    Hi all,

    I have a question. The situation is like this.

    I have website and allow user to login and check their details.
    Every pages are jsp file and contented connection to mysql database to retrieve information.

    Sometimes it can be accessed to mysql but sometimes cannot.
    and the error it give me is NullPointerExce ption.

    and i wonder why. Is it the connection to mysql is disconnected...
    See more | Go to post

  • nickyeng
    replied to ShortCode in j2me application
    i can't try it in my local country(malaysi a) because the shortcode is from India and my boss is going to India to deploy the system there, and i'm not going with him so there is no chance to test....
    See more | Go to post

    Leave a comment:


  • nickyeng
    started a topic ShortCode in j2me application

    ShortCode in j2me application

    i'm going to send sms to a shortcode in India through my phone midlet.

    i'm not sure whether i need to put the "+" sign or not , but here is my code:

    Code:
    String addr = "sms://+55111";  
    
    // OR
    
    String addr2 = "sms://55111";
    which line is correct ?


    pls give some advice ASAP..
    thanks
    ...
    See more | Go to post

  • nickyeng
    replied to Application Error - J2ME
    no one can give advise?
    See more | Go to post

    Leave a comment:


  • nickyeng
    started a topic What's wrong with this class
    in Java

    What's wrong with this class

    Hi all,

    i having a question in mobile development subforum, but i dont want to create a same thread in here.

    some more ppl here is more than ppl who go in mobile dev. subforum, so i decided to create this thread and giving the following url to let you go and take a look.

    What's Wrong with this class

    its urgent.
    thanks

    kindly
    nickyeng
    See more | Go to post

  • nickyeng
    started a topic cannot send out sms

    cannot send out sms

    I have this following code which it makes me cannot send sms in my j2me application.


    Code:
    import com.sun.midp.ssl.CryptoException;
    
    public class Encrypter {
    	
    	public static String toHexString(byte [] ab) {
    		StringBuffer sb = new StringBuffer(ab.length * 2) ;
    
    		 for(int i=0; i<ab.length; ++i) {
    		 String sTemp = Integer.toHexString(0xFF & ab[i]) ;
    ...
    See more | Go to post

  • nickyeng
    started a topic Application Error - J2ME

    Application Error - J2ME

    I have a j2me application which will be tested on motorola and sony ericsson phone.


    the j2me application will loads a image PNG format 6.36kb in size and length is 146x38 pixels ON startup for 3 seconds display on screen.

    it works fine on my Sony Ericsson K610i but it doesn't work in Motorola V3.

    The error message shows in Motorola V3 is "Applicatio n Error".

    Why is it...
    See more | Go to post

  • nickyeng
    replied to Null Pointer
    in Java
    exactly.

    now i make it ab = new byte[25];

    and it works fine now.

    ---
    but i have another problem...which my midlet on my phone cannot send out the sms....
    See more | Go to post

    Leave a comment:


  • nickyeng
    replied to Null Pointer
    in Java
    then based on my above code, which value possibly cause exception ?...
    See more | Go to post

    Leave a comment:


  • nickyeng
    replied to Null Pointer
    in Java
    doFinal method is come from com.sun.midp.ss l.MessageDigest class....
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...