public class

Encryption

extends JunctionExtra
java.lang.Object
   ↳ edu.stanford.junction.api.activity.JunctionExtra
     ↳ edu.stanford.junction.extra.Encryption

Summary

Constants
String FIELD_ENC If an invitation is accepted, auto-detect whether to use encryption via a parameter "aes=[key]" in the invitation.
String FIELD_IV
String URL_KEY_PARAM
Fields
protected byte[] mKey
Public Constructors
Encryption()
Public Methods
boolean beforeActivityCreate()
Called before an actor joins an activity.
boolean beforeActivityJoin()
Called before an actor joins an activity.
synchronized boolean beforeOnMessageReceived(MessageHeader h, JSONObject msg)
Decrypts an inbound message before handing it to the activity developer.
synchronized boolean beforeSendMessage(JSONObject msg)
Encrypts a message before sending it over the wire.
Integer getPriority()
Low priority so we don't interfere with other extras
static void main(String[] args)
void updateInvitationParameters(Map<StringString> params)
Update the parameters that will be sent in an invitation
[Expand]
Inherited Methods
From class edu.stanford.junction.api.activity.JunctionExtra
From class java.lang.Object

Constants

public static final String FIELD_ENC

If an invitation is accepted, auto-detect whether to use encryption via a parameter "aes=[key]" in the invitation.

Constant Value: "e"

public static final String FIELD_IV

Constant Value: "iv"

public static final String URL_KEY_PARAM

Constant Value: "skey"

Fields

protected byte[] mKey

Public Constructors

public Encryption ()

Public Methods

public boolean beforeActivityCreate ()

Called before an actor joins an activity. Returning false aborts the attempted join.

public boolean beforeActivityJoin ()

Called before an actor joins an activity. Returning false aborts the attempted join.

public synchronized boolean beforeOnMessageReceived (MessageHeader h, JSONObject msg)

Decrypts an inbound message before handing it to the activity developer.

public synchronized boolean beforeSendMessage (JSONObject msg)

Encrypts a message before sending it over the wire.

public Integer getPriority ()

Low priority so we don't interfere with other extras

public static void main (String[] args)

public void updateInvitationParameters (Map<StringString> params)

Update the parameters that will be sent in an invitation