Code:
/ FX-1434 / FX-1434 / 1.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
- KnownTypes.cs
- Run.cs
- SmtpSection.cs
- OnOperation.cs
- recordstate.cs
- ParameterModifier.cs
- ParameterCollection.cs
- MenuItemStyleCollection.cs
- AutomationPeer.cs
- XmlCountingReader.cs
- Run.cs
- FormViewDeletedEventArgs.cs
- DateTimeSerializationSection.cs
- ApplicationProxyInternal.cs
- cryptoapiTransform.cs
- TemplateFactory.cs
- ProfileSettings.cs
- ReaderWriterLockWrapper.cs
- ActivityStateQuery.cs
- URL.cs
- MultiAsyncResult.cs
- TabItemAutomationPeer.cs
- ListControlConvertEventArgs.cs
- ListViewDataItem.cs
- OciEnlistContext.cs
- TimeSpanValidator.cs
- MetadataItemSerializer.cs
- ScrollItemPatternIdentifiers.cs
- PropertyTab.cs
- XmlValidatingReader.cs
- EdmRelationshipNavigationPropertyAttribute.cs
- FontInfo.cs
- CriticalHandle.cs
- WebException.cs
- BaseComponentEditor.cs
- UserPreferenceChangedEventArgs.cs
- GenericUI.cs
- EntityKeyElement.cs
- SudsWriter.cs
- ArrayListCollectionBase.cs
- ProxyFragment.cs
- HttpRequestTraceRecord.cs
- PagePropertiesChangingEventArgs.cs
- EntityDataSourceWrapperCollection.cs
- TypeToStringValueConverter.cs
- UpdateTracker.cs
- WebPartTransformerCollection.cs
- Latin1Encoding.cs
- WorkflowHostingEndpoint.cs
- BaseTemplateCodeDomTreeGenerator.cs
- SqlCacheDependencyDatabaseCollection.cs
- MeasurementDCInfo.cs
- AlternateView.cs
- InvalidOleVariantTypeException.cs
- FormViewDeletedEventArgs.cs
- SequenceNumber.cs
- PrintingPermissionAttribute.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- CLSCompliantAttribute.cs
- HandleRef.cs
- Window.cs
- CodeDelegateCreateExpression.cs
- WebConfigurationFileMap.cs
- CodeArrayIndexerExpression.cs
- DesignerVerb.cs
- InstanceKey.cs
- CustomWebEventKey.cs
- ACL.cs
- EventLogPermissionEntry.cs
- AccessDataSourceView.cs
- SMSvcHost.cs
- DSACryptoServiceProvider.cs
- PreviewKeyDownEventArgs.cs
- BasicExpandProvider.cs
- FileChangesMonitor.cs
- DebugView.cs
- DocumentGridContextMenu.cs
- WindowsGraphics2.cs
- EarlyBoundInfo.cs
- DoubleUtil.cs
- Html32TextWriter.cs
- HttpClientProtocol.cs
- EventLogPermissionEntry.cs
- DataGridViewHitTestInfo.cs
- ProfileService.cs
- TypeBuilder.cs
- CrossSiteScriptingValidation.cs
- Stackframe.cs
- SrgsRule.cs
- MemberHolder.cs
- NotifyIcon.cs
- ConvertersCollection.cs
- GPRECT.cs
- WindowInteractionStateTracker.cs
- RegexGroupCollection.cs
- RefreshPropertiesAttribute.cs
- HMACMD5.cs
- RelationshipEnd.cs
- FormsAuthenticationConfiguration.cs
- ExpressionBinding.cs