internal PSKeyVaultKeyAttributes(Track1Sdk.KeyBundle keyBundle) { Enabled = keyBundle.Attributes.Enabled; Expires = keyBundle.Attributes.Expires; NotBefore = keyBundle.Attributes.NotBefore; KeyType = keyBundle.Key.Kty; KeyOps = keyBundle.Key.KeyOps.ToArray(); Created = keyBundle.Attributes.Created; Updated = keyBundle.Attributes.Updated; RecoveryLevel = keyBundle.Attributes.RecoveryLevel; Tags = keyBundle.Tags?.ConvertToHashtable(); Managed = Managed = keyBundle.Managed; }
protected PSKeyVaultKeyIdentityItem(Track1Sdk.KeyBundle keyBundle, bool isHsm = false) { if (keyBundle == null) { throw new ArgumentNullException("keyBundle"); } if (keyBundle.Attributes == null) { throw new ArgumentException(KeyVaultProperties.Resources.InvalidKeyAttributes); } Enabled = keyBundle.Attributes.Enabled; Expires = keyBundle.Attributes.Expires; NotBefore = keyBundle.Attributes.NotBefore; Created = keyBundle.Attributes.Created; Updated = keyBundle.Attributes.Updated; RecoveryLevel = keyBundle.Attributes.RecoveryLevel; Tags = (keyBundle.Tags == null) ? null : keyBundle.Tags.ConvertToHashtable();; IsHsm = isHsm; }
internal PSKeyVaultKey(Track1Sdk.KeyBundle keyBundle, VaultUriHelper vaultUriHelper, bool isHsm = false) : base(keyBundle, isHsm) { if (keyBundle == null) { throw new ArgumentNullException("keyBundle"); } if (keyBundle.Key == null || keyBundle.Attributes == null) { throw new ArgumentException(KeyVaultProperties.Resources.InvalidKeyBundle); } SetObjectIdentifier(vaultUriHelper, keyBundle.KeyIdentifier); // Key properties Key = keyBundle.Key; // Quick access for key properties KeySize = JwkHelper.ConvertToRSAKey(Key)?.KeySize; // Key additional properties Attributes = new PSKeyVaultKeyAttributes(keyBundle); }