Class ForwardedRoomKeyContent
- java.lang.Object
-
- io.github.ma1uta.matrix.event.content.ForwardedRoomKeyContent
-
- All Implemented Interfaces:
EventContent
public class ForwardedRoomKeyContent extends Object implements EventContent
This event type is used to forward keys for end-to-end encryption. Typically it is encrypted as an m.room.encrypted event, then sent as a to-device event.
-
-
Field Summary
Fields Modifier and Type Field Description private String
algorithm
Required.private List<String>
forwardingCurve25519KeyChain
Required.private String
roomId
Required.private String
senderClaimedEd25519Key
Required.private String
senderKey
Required.private String
sessionId
Required.private String
sessionKey
Required.
-
Constructor Summary
Constructors Constructor Description ForwardedRoomKeyContent()
-
Method Summary
Modifier and Type Method Description String
getAlgorithm()
List<String>
getForwardingCurve25519KeyChain()
String
getRoomId()
String
getSenderClaimedEd25519Key()
String
getSenderKey()
String
getSessionId()
String
getSessionKey()
void
setAlgorithm(String algorithm)
void
setForwardingCurve25519KeyChain(List<String> forwardingCurve25519KeyChain)
void
setRoomId(String roomId)
void
setSenderClaimedEd25519Key(String senderClaimedEd25519Key)
void
setSenderKey(String senderKey)
void
setSessionId(String sessionId)
void
setSessionKey(String sessionKey)
-
-
-
Field Detail
-
algorithm
private String algorithm
Required. The encryption algorithm the key in this event is to be used with.
-
roomId
private String roomId
Required. The room where the key is used.
-
senderKey
private String senderKey
Required. The Curve25519 key of the device which initiated the session originally.
-
sessionId
private String sessionId
Required. The ID of the session that the key is for.
-
sessionKey
private String sessionKey
Required. The key to be exchanged.
-
senderClaimedEd25519Key
private String senderClaimedEd25519Key
Required. The Ed25519 key of the device which initiated the session originally. It is 'claimed' because the receiving device has no way to tell that the original room_key actually came from a device which owns the private part of this key unless they have done device verification.
-
forwardingCurve25519KeyChain
private List<String> forwardingCurve25519KeyChain
Required. Chain of Curve25519 keys. It starts out empty, but each time the key is forwarded to another device, the previous sender in the chain is added to the end of the list. For example, if the key is forwarded from A to B to C, this field is empty between A and B, and contains A's Curve25519 key between B and C.
-
-
Method Detail
-
getAlgorithm
public String getAlgorithm()
-
setAlgorithm
public void setAlgorithm(String algorithm)
-
getRoomId
public String getRoomId()
-
setRoomId
public void setRoomId(String roomId)
-
getSenderKey
public String getSenderKey()
-
setSenderKey
public void setSenderKey(String senderKey)
-
getSessionId
public String getSessionId()
-
setSessionId
public void setSessionId(String sessionId)
-
getSessionKey
public String getSessionKey()
-
setSessionKey
public void setSessionKey(String sessionKey)
-
getSenderClaimedEd25519Key
public String getSenderClaimedEd25519Key()
-
setSenderClaimedEd25519Key
public void setSenderClaimedEd25519Key(String senderClaimedEd25519Key)
-
-