Package org.bouncycastle.mls.codec
Class PrivateMessage
java.lang.Object
org.bouncycastle.mls.codec.PrivateMessage
- All Implemented Interfaces:
MLSInputStream.Readable
,MLSOutputStream.Writable
public class PrivateMessage
extends Object
implements MLSInputStream.Readable, MLSOutputStream.Writable
-
Constructor Summary
ConstructorsConstructorDescriptionPrivateMessage
(byte[] group_id, long epoch, ContentType content_type, byte[] authenticated_data, byte[] encrypted_sender_data, byte[] ciphertext) -
Method Summary
Modifier and TypeMethodDescriptionstatic PrivateMessage
protect
(AuthenticatedContent auth, MlsCipherSuite suite, GroupKeySet keys, byte[] senderDataSecretBytes, int paddingSize) unprotect
(MlsCipherSuite suite, GroupKeySet keys, byte[] senderDataSecretBytes) void
writeTo
(MLSOutputStream stream)
-
Constructor Details
-
PrivateMessage
public PrivateMessage(byte[] group_id, long epoch, ContentType content_type, byte[] authenticated_data, byte[] encrypted_sender_data, byte[] ciphertext)
-
-
Method Details
-
protect
public static PrivateMessage protect(AuthenticatedContent auth, MlsCipherSuite suite, GroupKeySet keys, byte[] senderDataSecretBytes, int paddingSize) throws IOException, IllegalAccessException, org.bouncycastle.crypto.InvalidCipherTextException - Throws:
IOException
IllegalAccessException
org.bouncycastle.crypto.InvalidCipherTextException
-
unprotect
public AuthenticatedContent unprotect(MlsCipherSuite suite, GroupKeySet keys, byte[] senderDataSecretBytes) throws Exception - Throws:
Exception
-
writeTo
- Specified by:
writeTo
in interfaceMLSOutputStream.Writable
- Throws:
IOException
-