Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / clr / src / BCL / System / Security / Cryptography / KeyedHashAlgorithm.cs / 1 / KeyedHashAlgorithm.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // // KeyedHashAlgorithm.cs // namespace System.Security.Cryptography { [System.Runtime.InteropServices.ComVisible(true)] public abstract class KeyedHashAlgorithm : HashAlgorithm { protected byte[] KeyValue; protected KeyedHashAlgorithm() {} // IDisposable methods protected override void Dispose(bool disposing) { // For keyed hash algorithms, we always want to zero out the key value if (disposing) { if (KeyValue != null) Array.Clear(KeyValue, 0, KeyValue.Length); KeyValue = null; } base.Dispose(disposing); } // // public properties // public virtual byte[] Key { get { return (byte[]) KeyValue.Clone(); } set { if (State != 0) throw new CryptographicException(Environment.GetResourceString("Cryptography_HashKeySet")); KeyValue = (byte[]) value.Clone(); } } // // public methods // new static public KeyedHashAlgorithm Create() { return Create("System.Security.Cryptography.KeyedHashAlgorithm"); } new static public KeyedHashAlgorithm Create(String algName) { return (KeyedHashAlgorithm) CryptoConfig.CreateFromName(algName); } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- OleAutBinder.cs
- PrintController.cs
- sqlinternaltransaction.cs
- DataGridViewRowsAddedEventArgs.cs
- Rijndael.cs
- HtmlInputButton.cs
- XmlMtomReader.cs
- SettingsContext.cs
- securitycriticaldataformultiplegetandset.cs
- ServiceOperation.cs
- CodeAttachEventStatement.cs
- ScalarOps.cs
- DataBinder.cs
- NameValuePermission.cs
- DragDeltaEventArgs.cs
- EventLogPermissionAttribute.cs
- MetabaseReader.cs
- EventLevel.cs
- SAPICategories.cs
- ConnectionConsumerAttribute.cs
- RuleConditionDialog.cs
- ScrollProperties.cs
- SafeSystemMetrics.cs
- SoapFault.cs
- ArithmeticException.cs
- StringKeyFrameCollection.cs
- DataObjectAttribute.cs
- ResourceManagerWrapper.cs
- DecoderReplacementFallback.cs
- Transactions.cs
- HttpProtocolImporter.cs
- MemberMemberBinding.cs
- StringConcat.cs
- FreezableDefaultValueFactory.cs
- AccessDataSourceView.cs
- StateMachineWorkflowDesigner.cs
- PrintDialog.cs
- SchemaElementLookUpTable.cs
- InvalidEnumArgumentException.cs
- _UriSyntax.cs
- HttpVersion.cs
- ProtectedConfigurationSection.cs
- DefaultAsyncDataDispatcher.cs
- MetaType.cs
- __TransparentProxy.cs
- TrackingMemoryStream.cs
- DataGridViewColumnCollection.cs
- ObjectTag.cs
- CodePageEncoding.cs
- HitTestFilterBehavior.cs
- Container.cs
- log.cs
- CrossContextChannel.cs
- QueryableDataSource.cs
- MessageBox.cs
- ToolStripItemRenderEventArgs.cs
- Interlocked.cs
- GuidConverter.cs
- ClassGenerator.cs
- CodeDirectoryCompiler.cs
- SymmetricCryptoHandle.cs
- RefreshEventArgs.cs
- DataGridViewRowHeaderCell.cs
- XmlSchemaSet.cs
- Expression.cs
- Calendar.cs
- VirtualDirectoryMapping.cs
- SessionStateUtil.cs
- ResourceAttributes.cs
- IteratorFilter.cs
- DesignerSelectionListAdapter.cs
- ContentControl.cs
- DigitalSignatureProvider.cs
- WindowsTokenRoleProvider.cs
- EventDriven.cs
- ComponentDispatcher.cs
- CodeFieldReferenceExpression.cs
- DropSourceBehavior.cs
- QueryExtender.cs
- AuthenticatedStream.cs
- OptionUsage.cs
- SafeNativeMethods.cs
- X509CertificateStore.cs
- ToolBarTray.cs
- MessageDecoder.cs
- DataGridTextBoxColumn.cs
- WinInet.cs
- _ShellExpression.cs
- DataGridColumnHeaderCollection.cs
- App.cs
- BitmapImage.cs
- Expander.cs
- SortedList.cs
- TransformerConfigurationWizardBase.cs
- ResourceLoader.cs
- PixelShader.cs
- Action.cs
- TextElementCollection.cs
- RadioButton.cs
- Rectangle.cs