public InfoCardSymmetricCrypto(SymmetricCryptoHandle cryptoHandle) { this.m_cryptoHandle = (SymmetricCryptoHandle)cryptoHandle.Duplicate(); try { this.m_params = (RpcSymmetricCryptoParameters)this.m_cryptoHandle.Parameters; } catch { if (this.m_cryptoHandle != null) { this.m_cryptoHandle.Dispose(); this.m_cryptoHandle = null; } throw; } }
public InfoCardSymmetricCrypto(SymmetricCryptoHandle cryptoHandle) { this.m_cryptoHandle = (SymmetricCryptoHandle) cryptoHandle.Duplicate(); try { this.m_params = (RpcSymmetricCryptoParameters) this.m_cryptoHandle.Parameters; } catch { if (this.m_cryptoHandle != null) { this.m_cryptoHandle.Dispose(); this.m_cryptoHandle = null; } throw; } }
public InfoCardSymmetricAlgorithm(SymmetricCryptoHandle cryptoHandle) { this.m_cryptoHandle = (SymmetricCryptoHandle) cryptoHandle.Duplicate(); try { this.m_parameters = (RpcSymmetricCryptoParameters) this.m_cryptoHandle.Parameters; base.KeySizeValue = this.m_parameters.keySize; base.BlockSizeValue = this.m_parameters.blockSize; base.FeedbackSizeValue = this.m_parameters.feedbackSize; base.LegalBlockSizesValue = new KeySizes[] { new KeySizes(base.BlockSizeValue, base.BlockSizeValue, 0) }; base.LegalKeySizesValue = new KeySizes[] { new KeySizes(base.KeySizeValue, base.KeySizeValue, 0) }; } catch { this.m_cryptoHandle.Dispose(); throw; } }
public InfoCardSymmetricAlgorithm(SymmetricCryptoHandle cryptoHandle) { this.m_cryptoHandle = (SymmetricCryptoHandle)cryptoHandle.Duplicate(); try { this.m_parameters = (RpcSymmetricCryptoParameters)this.m_cryptoHandle.Parameters; base.KeySizeValue = this.m_parameters.keySize; base.BlockSizeValue = this.m_parameters.blockSize; base.FeedbackSizeValue = this.m_parameters.feedbackSize; base.LegalBlockSizesValue = new KeySizes[] { new KeySizes(base.BlockSizeValue, base.BlockSizeValue, 0) }; base.LegalKeySizesValue = new KeySizes[] { new KeySizes(base.KeySizeValue, base.KeySizeValue, 0) }; } catch { this.m_cryptoHandle.Dispose(); throw; } }
// // Summary: // Creates a new InfoCardSymmetricCrypto based on a SymmetricCryptoHandle // // Parameters: // cryptoHandle - A handle to the symmetric key on which to base this object. // public InfoCardSymmetricCrypto(SymmetricCryptoHandle cryptoHandle) : base() { m_cryptoHandle = (SymmetricCryptoHandle)cryptoHandle.Duplicate(); try { m_params = (RpcSymmetricCryptoParameters)m_cryptoHandle.Parameters; } catch { if (null != m_cryptoHandle) { m_cryptoHandle.Dispose(); m_cryptoHandle = null; } throw; } }
// // Summary: // Creates a new InfoCardSymmetricCrypto based on a SymmetricCryptoHandle // // Parameters: // cryptoHandle - A handle to the symmetric key on which to base this object. // public InfoCardSymmetricCrypto(SymmetricCryptoHandle cryptoHandle) : base() { m_cryptoHandle = (SymmetricCryptoHandle)cryptoHandle.Duplicate(); try { m_params = (RpcSymmetricCryptoParameters)m_cryptoHandle.Parameters; } catch { if (null != m_cryptoHandle) { m_cryptoHandle.Dispose(); m_cryptoHandle = null; } throw; } }
// // Summary: // Constructs an InfoCardSymmetricAlgorithm // // Parameters: // cryptoHandle - A handle to the symmetric key to base the symmetric algorithm on. // public InfoCardSymmetricAlgorithm(SymmetricCryptoHandle cryptoHandle) : base() { m_cryptoHandle = (SymmetricCryptoHandle)cryptoHandle.Duplicate(); try { m_parameters = (RpcSymmetricCryptoParameters)m_cryptoHandle.Parameters; KeySizeValue = m_parameters.keySize; BlockSizeValue = m_parameters.blockSize; FeedbackSizeValue = m_parameters.feedbackSize; LegalBlockSizesValue = new KeySizes[] { new KeySizes(BlockSizeValue, BlockSizeValue, 0) }; LegalKeySizesValue = new KeySizes[] { new KeySizes(KeySizeValue, KeySizeValue, 0) }; } catch { m_cryptoHandle.Dispose(); throw; } }
// // Summary: // Constructs an InfoCardSymmetricAlgorithm // // Parameters: // cryptoHandle - A handle to the symmetric key to base the symmetric algorithm on. // public InfoCardSymmetricAlgorithm(SymmetricCryptoHandle cryptoHandle) : base() { m_cryptoHandle = (SymmetricCryptoHandle)cryptoHandle.Duplicate(); try { m_parameters = (RpcSymmetricCryptoParameters)m_cryptoHandle.Parameters; KeySizeValue = m_parameters.keySize; BlockSizeValue = m_parameters.blockSize; FeedbackSizeValue = m_parameters.feedbackSize; LegalBlockSizesValue = new KeySizes[] { new KeySizes(BlockSizeValue, BlockSizeValue, 0) }; LegalKeySizesValue = new KeySizes[] { new KeySizes(KeySizeValue, KeySizeValue, 0) }; } catch { m_cryptoHandle.Dispose(); throw; } }