SecurityConfig class

Represents the configuration for security settings.

This class encapsulates settings related to security features, including encryption, secure storage, and SSL pinning. It provides methods for converting between JSON and Dart objects for data persistence and serialization.

Important Security Note: The encryptionKey should be handled with extreme care. Avoid exposing it in client-side code or storing it in version control. Ideally, it should be securely managed and retrieved at runtime.

Constructors

SecurityConfig({required bool enableEncryption, required bool enableSecureStorage, required bool sslPinning, required String encryptionKey})
Creates a SecurityConfig instance.
SecurityConfig.fromJson(Map<String, dynamic> json)
Creates a SecurityConfig instance from a JSON map.
factory

Properties

enableEncryption bool
Whether data encryption is enabled.
final
enableSecureStorage bool
Whether secure storage mechanisms should be used for sensitive data.
final
encryptionKey String
The encryption key used for data encryption.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sslPinning bool
Whether SSL pinning is enabled for network connections.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts this SecurityConfig instance to a JSON map.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited