EncryptionManager.create constructor
EncryptionManager.create({
- required String userId,
- EncryptionAlgorithm algorithm = EncryptionAlgorithm.aes128Gcm,
Creates a manager that encrypts outgoing frames as userId.
userId must be non-empty and must be the local user's id — remote
participants select a decryption key by it.
Implementation
factory EncryptionManager.create({
required String userId,
EncryptionAlgorithm algorithm = EncryptionAlgorithm.aes128Gcm,
}) {
if (userId.isEmpty) {
throw ArgumentError.value(userId, 'userId', 'must not be empty');
}
return createEncryptionManager(userId: userId, algorithm: algorithm);
}