Skip to content

Commit

Permalink
adding constructor which takes initialization vector
Browse files Browse the repository at this point in the history
  • Loading branch information
Devendra committed Jul 6, 2013
1 parent 0f6db83 commit b6d49f2
Show file tree
Hide file tree
Showing 34 changed files with 186 additions and 110 deletions.
Binary file modified android/Pubnub-Android-3.5.2.jar
Binary file not shown.
Binary file modified android/examples/PubnubExample/libs/Pubnub-Android-3.5.2.jar
Binary file not shown.
Binary file modified android/examples/SubscribeAtBoot/libs/Pubnub-Android-3.5.2.jar
Binary file not shown.
Binary file modified blackberry/Pubnub-BlackBerry-3.5.2.jar
Binary file not shown.
Binary file modified j2me/Pubnub-MicroEdition-3.5.2.jar
Binary file not shown.
8 changes: 6 additions & 2 deletions j2me/src/com/pubnub/api/Pubnub.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.pubnub.api;

import org.bouncycastle.util.SecureRandom;

import org.json.me.*;

public class Pubnub extends PubnubCore {

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

public Pubnub(String publish_key, String subscribe_key, String secret_key,
String cipher_key, boolean ssl_on, String initialization_vector) {
super(publish_key, subscribe_key, secret_key, cipher_key, ssl_on, initialization_vector);
}

public Pubnub(String publish_key, String subscribe_key, String secret_key,
boolean ssl_on) {
super(publish_key, subscribe_key, secret_key, "", ssl_on);
}


public Pubnub(String publish_key, String subscribe_key) {
super(publish_key, subscribe_key, "", "", false);
}
Expand Down
4 changes: 4 additions & 0 deletions j2me/src1/com/pubnub/api/PubnubCrypto.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ public PubnubCrypto(String CIPHER_KEY) {
super(CIPHER_KEY);
}

public PubnubCrypto(String CIPHER_KEY, String IV) {
super(CIPHER_KEY, IV);
}

/**
* Sign Message
*
Expand Down
21 changes: 21 additions & 0 deletions j2me/src1/com/pubnub/api/PubnubUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;
import org.json.me.*;

public class PubnubUtil extends PubnubUtilCore {

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

return en;
}

/**
* Convert input String to JSONObject, JSONArray, or String
*
* @param str
* JSON data in string format
*
* @return JSONArray or JSONObject or String
*/
static Object stringToJSON(String str) {
try {
return new JSONArray(str);
} catch (JSONException e) {
}
try {
return new JSONObject(str);
} catch (JSONException ex) {
}
return str;
}
private static String _dontNeedEncoding = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ -_.*";
}
Binary file modified java/Pubnub-StandardEdition-3.5.2.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions java/doc/allclasses-frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Fri Jul 05 09:15:34 IST 2013 -->
<!-- Generated by javadoc (build 1.6.0_37) on Sun Jul 07 00:29:20 IST 2013 -->
<TITLE>
All Classes
</TITLE>

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

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

Expand Down
4 changes: 2 additions & 2 deletions java/doc/allclasses-noframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Fri Jul 05 09:15:34 IST 2013 -->
<!-- Generated by javadoc (build 1.6.0_37) on Sun Jul 07 00:29:20 IST 2013 -->
<TITLE>
All Classes
</TITLE>

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

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

Expand Down
4 changes: 2 additions & 2 deletions java/doc/com/pubnub/api/Callback.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Fri Jul 05 09:15:33 IST 2013 -->
<!-- Generated by javadoc (build 1.6.0_37) on Sun Jul 07 00:29:17 IST 2013 -->
<TITLE>
Callback
</TITLE>

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

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

Expand Down
4 changes: 2 additions & 2 deletions java/doc/com/pubnub/api/Pubnub.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Fri Jul 05 09:15:33 IST 2013 -->
<!-- Generated by javadoc (build 1.6.0_37) on Sun Jul 07 00:29:17 IST 2013 -->
<TITLE>
Pubnub
</TITLE>

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

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

Expand Down
4 changes: 2 additions & 2 deletions java/doc/com/pubnub/api/PubnubError.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Fri Jul 05 09:15:34 IST 2013 -->
<!-- Generated by javadoc (build 1.6.0_37) on Sun Jul 07 00:29:18 IST 2013 -->
<TITLE>
PubnubError
</TITLE>

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

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

Expand Down
4 changes: 2 additions & 2 deletions java/doc/com/pubnub/api/PubnubException.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Fri Jul 05 09:15:34 IST 2013 -->
<!-- Generated by javadoc (build 1.6.0_37) on Sun Jul 07 00:29:19 IST 2013 -->
<TITLE>
PubnubException
</TITLE>

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

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

Expand Down
4 changes: 2 additions & 2 deletions java/doc/com/pubnub/api/PubnubUtil.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Fri Jul 05 09:15:34 IST 2013 -->
<!-- Generated by javadoc (build 1.6.0_37) on Sun Jul 07 00:29:19 IST 2013 -->
<TITLE>
PubnubUtil
</TITLE>

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

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

Expand Down
4 changes: 2 additions & 2 deletions java/doc/com/pubnub/api/package-frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Fri Jul 05 09:15:34 IST 2013 -->
<!-- Generated by javadoc (build 1.6.0_37) on Sun Jul 07 00:29:19 IST 2013 -->
<TITLE>
com.pubnub.api
</TITLE>

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

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

Expand Down
4 changes: 2 additions & 2 deletions java/doc/com/pubnub/api/package-summary.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Fri Jul 05 09:15:34 IST 2013 -->
<!-- Generated by javadoc (build 1.6.0_37) on Sun Jul 07 00:29:19 IST 2013 -->
<TITLE>
com.pubnub.api
</TITLE>

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

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

Expand Down
4 changes: 2 additions & 2 deletions java/doc/com/pubnub/api/package-tree.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Fri Jul 05 09:15:34 IST 2013 -->
<!-- Generated by javadoc (build 1.6.0_37) on Sun Jul 07 00:29:20 IST 2013 -->
<TITLE>
com.pubnub.api Class Hierarchy
</TITLE>

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

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

Expand Down
4 changes: 2 additions & 2 deletions java/doc/constant-values.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Fri Jul 05 09:15:34 IST 2013 -->
<!-- Generated by javadoc (build 1.6.0_37) on Sun Jul 07 00:29:20 IST 2013 -->
<TITLE>
Constant Field Values
</TITLE>

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

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

Expand Down
4 changes: 2 additions & 2 deletions java/doc/deprecated-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Fri Jul 05 09:15:34 IST 2013 -->
<!-- Generated by javadoc (build 1.6.0_37) on Sun Jul 07 00:29:20 IST 2013 -->
<TITLE>
Deprecated List
</TITLE>

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

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

Expand Down
4 changes: 2 additions & 2 deletions java/doc/help-doc.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Fri Jul 05 09:15:34 IST 2013 -->
<!-- Generated by javadoc (build 1.6.0_37) on Sun Jul 07 00:29:20 IST 2013 -->
<TITLE>
API Help
</TITLE>

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

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

Expand Down
4 changes: 2 additions & 2 deletions java/doc/index-all.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Fri Jul 05 09:15:34 IST 2013 -->
<!-- Generated by javadoc (build 1.6.0_37) on Sun Jul 07 00:29:20 IST 2013 -->
<TITLE>
Index
</TITLE>

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

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

Expand Down
2 changes: 1 addition & 1 deletion java/doc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Fri Jul 05 09:15:34 IST 2013-->
<!-- Generated by javadoc on Sun Jul 07 00:29:20 IST 2013-->
<TITLE>
Generated Documentation (Untitled)
</TITLE>
Expand Down
4 changes: 2 additions & 2 deletions java/doc/overview-tree.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Fri Jul 05 09:15:34 IST 2013 -->
<!-- Generated by javadoc (build 1.6.0_37) on Sun Jul 07 00:29:20 IST 2013 -->
<TITLE>
Class Hierarchy
</TITLE>

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

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

Expand Down
4 changes: 2 additions & 2 deletions java/doc/serialized-form.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Fri Jul 05 09:15:34 IST 2013 -->
<!-- Generated by javadoc (build 1.6.0_37) on Sun Jul 07 00:29:20 IST 2013 -->
<TITLE>
Serialized Form
</TITLE>

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

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

Expand Down
Loading

0 comments on commit b6d49f2

Please sign in to comment.