public static Create ( EncryptionType type ) : Encryptor | ||
type | EncryptionType | |
Résultat | Encryptor |
bool createEncryptor(EncryptionType type) { Encryptor encryptor = Encryptor.Create(type); if (encryptor == null) { LogWarning("Failed to create encryptor: {0}", type); return(false); } encryptors_[type] = encryptor; if (default_encryptor_ == EncryptionType.kNoneEncryption) { setDefaultEncryption(type); } return(true); }
bool createEncryptor(EncryptionType type) { if (encryptors_.ContainsKey(type)) { return(true); } Encryptor encryptor = Encryptor.Create(type); if (encryptor == null) { LogWarning("Encryptor - Failed to create '{0}' encryptor", type); return(false); } encryptors_[type] = encryptor; if (default_encryptor_ == EncryptionType.kNoneEncryption) { setDefaultEncryption(type); } return(true); }