forked from pubnub/javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcrypto-check.html
More file actions
41 lines (31 loc) · 795 Bytes
/
crypto-check.html
File metadata and controls
41 lines (31 loc) · 795 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<div id=pubnub></div>
<script src="../pubnub.min.js"></script>
<script>(function(){
var pubnub = PUBNUB.init({
publish_key : "demo",
subscribe_key : "demo"
});
var pubnub_enc = PUBNUB.init({
publish_key : "demo",
subscribe_key : "demo",
cipher_key : "demo"
});
pubnub.subscribe({
channel : "abcd",
callback : function(message) {
console.log( typeof message + " > " + JSON.stringify(message) );
},
error : function(r) {
console.log(JSON.stringify(r));
},
});
pubnub_enc.subscribe({
channel : "abcd-enc",
callback : function(message) {
console.log( 'enc : ' + typeof message + " > " + JSON.stringify(message) );
},
error : function(r) {
console.log(JSON.stringify(r));
},
});
})();</script>