SqlClientEncryptionAlgorithmFactory.cs 1.6 KB

1234567891011121314151617181920212223242526
  1. //------------------------------------------------------------------------------
  2. // <copyright file="SqlException.cs" company="Microsoft">
  3. // Copyright (c) Microsoft Corporation. All rights reserved.
  4. // </copyright>
  5. // <owner current="true" primary="true">balnee</owner>
  6. // <owner current="true" primary="false">krishnib</owner>
  7. //------------------------------------------------------------------------------
  8. namespace System.Data.SqlClient
  9. {
  10. /// <summary>
  11. /// Abstract base class for all TCE encryption algorithm factory classes. Factory classes create instances of an encryption algorithm
  12. /// with a given key. At runtime when we determine a particular column is marked for TCE, based on the encryption algorithm we invoke
  13. /// the corresponding factory class and retrieve an object to an encryption algorithm.
  14. /// </summary>
  15. internal abstract class SqlClientEncryptionAlgorithmFactory
  16. {
  17. /// <summary>
  18. /// Creates an encrytion algorithm with a given key.
  19. /// </summary>
  20. /// <param name="rootKey">encryption key that should be passed to the encryption algorithm to be created</param>
  21. /// <param name="encryptionType">Encryption Type, some algorithms will need this</param>
  22. /// <param name="encryptionAlgorithm">Encryption algorithm name. Needed for extracting version bits</param>
  23. /// <returns>Return a newly created SqlClientEncryptionAlgorithm instance</returns>
  24. internal abstract SqlClientEncryptionAlgorithm Create(SqlClientSymmetricKey encryptionKey, SqlClientEncryptionType encryptionType, string encryptionAlgorithm);
  25. }
  26. }