public SystemSettingsRepository( VirtualWorkDatabaseContext mtfDatabase, SystemSettingConverter systemSettingConverter, PasswordHashRepository passwordHashRepository, ProductionCipher productionCipher) : base(mtfDatabase, systemSettingConverter, mtfDatabase.SystemSettings) { this.productionCipher = productionCipher; encryptorKey = passwordHashRepository.GetSystemEncryptionPassword("sd4lrR!FÉ.4SW3"); }
public string Decrypt(string cipherText, ProductionCipherKey productionCipherKey) { return(caesarCipher.Encrypt(rotateCipher.Encrypt(xorCipher.Encrypt(cipherText, productionCipherKey.Password), -productionCipherKey.RotateKey), -productionCipherKey.ReplaceKey)); }
public string Encrypt(string plainText, ProductionCipherKey productionCipherKey) { return(xorCipher.Encrypt(rotateCipher.Encrypt(caesarCipher.Encrypt(plainText, productionCipherKey.ReplaceKey), productionCipherKey.RotateKey), productionCipherKey.Password)); }