fromConfigString static method

EncryptionType fromConfigString(
  1. String value
)

Create encryption type from configuration string

Implementation

static EncryptionType fromConfigString(String value) {
  switch (value.toLowerCase()) {
    case 'none':
      return EncryptionType.none;
    case 'xor':
    case 'xor_obfuscation':
      return EncryptionType.xorObfuscation;
    case 'chacha20':
    case 'chacha20_poly1305':
    case 'chacha20-poly1305':
      return EncryptionType.chacha20Poly1305;
    case 'aes256':
    case 'aes_256_gcm':
    case 'aes-256-gcm':
      return EncryptionType.aes256Gcm;
    default:
      return EncryptionType.xorObfuscation; // Default fallback
  }
}