Skip to content

Commit b6d49f2

Browse files
author
Devendra
committed
adding constructor which takes initialization vector
1 parent 0f6db83 commit b6d49f2

34 files changed

Lines changed: 186 additions & 110 deletions

‎android/Pubnub-Android-3.5.2.jar‎

325 Bytes
Binary file not shown.
325 Bytes
Binary file not shown.
325 Bytes
Binary file not shown.
214 Bytes
Binary file not shown.

‎j2me/Pubnub-MicroEdition-3.5.2.jar‎

246 Bytes
Binary file not shown.

‎j2me/src/com/pubnub/api/Pubnub.java‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.pubnub.api;
22

33
import org.bouncycastle.util.SecureRandom;
4-
4+
import org.json.me.*;
55

66
public class Pubnub extends PubnubCore {
77

@@ -10,12 +10,16 @@ public Pubnub(String publish_key, String subscribe_key, String secret_key,
1010
super(publish_key, subscribe_key, secret_key, cipher_key, ssl_on);
1111
}
1212

13+
public Pubnub(String publish_key, String subscribe_key, String secret_key,
14+
String cipher_key, boolean ssl_on, String initialization_vector) {
15+
super(publish_key, subscribe_key, secret_key, cipher_key, ssl_on, initialization_vector);
16+
}
17+
1318
public Pubnub(String publish_key, String subscribe_key, String secret_key,
1419
boolean ssl_on) {
1520
super(publish_key, subscribe_key, secret_key, "", ssl_on);
1621
}
1722

18-
1923
public Pubnub(String publish_key, String subscribe_key) {
2024
super(publish_key, subscribe_key, "", "", false);
2125
}

‎j2me/src1/com/pubnub/api/PubnubCrypto.java‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ public PubnubCrypto(String CIPHER_KEY) {
1111
super(CIPHER_KEY);
1212
}
1313

14+
public PubnubCrypto(String CIPHER_KEY, String IV) {
15+
super(CIPHER_KEY, IV);
16+
}
17+
1418
/**
1519
* Sign Message
1620
*

‎j2me/src1/com/pubnub/api/PubnubUtil.java‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import java.io.IOException;
55
import java.io.OutputStreamWriter;
66
import java.io.UnsupportedEncodingException;
7+
import org.json.me.*;
78

89
public class PubnubUtil extends PubnubUtilCore {
910

@@ -122,5 +123,25 @@ public static boolean dontNeedEncoding(int ch) {
122123

123124
return en;
124125
}
126+
127+
/**
128+
* Convert input String to JSONObject, JSONArray, or String
129+
*
130+
* @param str
131+
* JSON data in string format
132+
*
133+
* @return JSONArray or JSONObject or String
134+
*/
135+
static Object stringToJSON(String str) {
136+
try {
137+
return new JSONArray(str);
138+
} catch (JSONException e) {
139+
}
140+
try {
141+
return new JSONObject(str);
142+
} catch (JSONException ex) {
143+
}
144+
return str;
145+
}
125146
private static String _dontNeedEncoding = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ -_.*";
126147
}
357 Bytes
Binary file not shown.

‎java/doc/allclasses-frame.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
<!--NewPage-->
33
<HTML>
44
<HEAD>
5-
<!-- Generated by javadoc (build 1.6.0_37) on Fri Jul 05 09:15:34 IST 2013 -->
5+
<!-- Generated by javadoc (build 1.6.0_37) on Sun Jul 07 00:29:20 IST 2013 -->
66
<TITLE>
77
All Classes
88
</TITLE>
99

10-
<META NAME="date" CONTENT="2013-07-05">
10+
<META NAME="date" CONTENT="2013-07-07">
1111

1212
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
1313

0 commit comments

Comments
 (0)