Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the KeyEncryptionKey class.
 /// </summary>
 /// <param name="kekType">Type of encryption key used for key
 /// encryption. Possible values include: 'MicrosoftManaged',
 /// 'CustomerManaged'</param>
 /// <param name="kekUrl">Key encryption key. It is required in case of
 /// Customer managed KekType.</param>
 /// <param name="kekVaultResourceID">Kek vault resource id. It is
 /// required in case of Customer managed KekType.</param>
 public KeyEncryptionKey(KekType kekType, string kekUrl = default(string), string kekVaultResourceID = default(string))
 {
     KekType            = kekType;
     KekUrl             = kekUrl;
     KekVaultResourceID = kekVaultResourceID;
     CustomInit();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the KeyEncryptionKey class.
 /// </summary>
 /// <param name="kekType">Type of encryption key used for key
 /// encryption. Possible values include: 'MicrosoftManaged',
 /// 'CustomerManaged'</param>
 /// <param name="identityProperties">Managed identity properties used
 /// for key encryption.</param>
 /// <param name="kekUrl">Key encryption key. It is required in case of
 /// Customer managed KekType.</param>
 /// <param name="kekVaultResourceID">Kek vault resource id. It is
 /// required in case of Customer managed KekType.</param>
 public KeyEncryptionKey(KekType kekType, IdentityProperties identityProperties = default(IdentityProperties), string kekUrl = default(string), string kekVaultResourceID = default(string))
 {
     KekType            = kekType;
     IdentityProperties = identityProperties;
     KekUrl             = kekUrl;
     KekVaultResourceID = kekVaultResourceID;
     CustomInit();
 }
Ejemplo n.º 3
0
        internal static string ToSerializedValue(this KekType value)
        {
            switch (value)
            {
            case KekType.MicrosoftManaged:
                return("MicrosoftManaged");

            case KekType.CustomerManaged:
                return("CustomerManaged");
            }
            return(null);
        }
 /// <summary>
 /// Converts the <see cref="sourceValue" /> parameter to the <see cref="destinationType" /> parameter using <see cref="formatProvider"
 /// /> and <see cref="ignoreCase" />
 /// </summary>
 /// <param name="sourceValue">the <see cref="System.Object"/> to convert from</param>
 /// <param name="destinationType">the <see cref="System.Type" /> to convert to</param>
 /// <param name="formatProvider">not used by this TypeConverter.</param>
 /// <param name="ignoreCase">when set to <c>true</c>, will ignore the case when converting.</param>
 /// <returns>
 /// an instance of <see cref="KekType" />, or <c>null</c> if there is no suitable conversion.
 /// </returns>
 public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => KekType.CreateFrom(sourceValue);