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
- FieldAccessException.cs
- ServicePointManagerElement.cs
- CompilerState.cs
- LogWriteRestartAreaState.cs
- EmptyEnumerator.cs
- RemoteWebConfigurationHost.cs
- WebPartCatalogAddVerb.cs
- SessionViewState.cs
- IdentityModelDictionary.cs
- ContentTypeSettingClientMessageFormatter.cs
- StorageBasedPackageProperties.cs
- Mouse.cs
- ErrorEventArgs.cs
- xml.cs
- DesignBindingPropertyDescriptor.cs
- ResourceAssociationTypeEnd.cs
- XmlDeclaration.cs
- DbConnectionPoolGroup.cs
- CompositeFontFamily.cs
- PixelFormat.cs
- StaticSiteMapProvider.cs
- TextShapeableCharacters.cs
- DataTransferEventArgs.cs
- ChildrenQuery.cs
- PeerNameRegistration.cs
- ExtendedProperty.cs
- AddressAlreadyInUseException.cs
- Converter.cs
- EntityTemplateFactory.cs
- ListSortDescriptionCollection.cs
- DocumentApplicationJournalEntry.cs
- TimeSpanSecondsConverter.cs
- InstanceDataCollectionCollection.cs
- HttpContext.cs
- UserNameSecurityTokenAuthenticator.cs
- Operator.cs
- GridViewUpdateEventArgs.cs
- XmlSchemaImport.cs
- DataGridColumnsPage.cs
- ProxyGenerationError.cs
- PropertyGroupDescription.cs
- IntellisenseTextBox.cs
- Rotation3D.cs
- ToolStripItemRenderEventArgs.cs
- WebSysDescriptionAttribute.cs
- PartialCachingAttribute.cs
- TreeViewImageIndexConverter.cs
- EditorPartChrome.cs
- SerializationHelper.cs
- ComponentChangingEvent.cs
- Paragraph.cs
- ProviderUtil.cs
- LocalizabilityAttribute.cs
- SystemIPInterfaceStatistics.cs
- PathFigureCollectionConverter.cs
- TextContainerChangedEventArgs.cs
- GridSplitter.cs
- SynchronizedReadOnlyCollection.cs
- StrokeIntersection.cs
- WebControlParameterProxy.cs
- PermissionSet.cs
- InheritedPropertyChangedEventArgs.cs
- TextBoxBaseDesigner.cs
- ClientCultureInfo.cs
- EmptyStringExpandableObjectConverter.cs
- SQlBooleanStorage.cs
- WebPartCloseVerb.cs
- XmlLinkedNode.cs
- DiscoveryExceptionDictionary.cs
- AgileSafeNativeMemoryHandle.cs
- EditableRegion.cs
- DataGridViewRowEventArgs.cs
- TextClipboardData.cs
- ReferenceConverter.cs
- XsdValidatingReader.cs
- FilteredAttributeCollection.cs
- RoleManagerSection.cs
- Int16Converter.cs
- Variable.cs
- MaskedTextProvider.cs
- UserPreferenceChangedEventArgs.cs
- Stack.cs
- XmlArrayAttribute.cs
- PipeStream.cs
- PeerCredential.cs
- MsmqIntegrationInputChannel.cs
- UserControlDocumentDesigner.cs
- _ListenerRequestStream.cs
- SqlDataSourceCommandEventArgs.cs
- ShellProvider.cs
- RemotingServices.cs
- PersonalizationAdministration.cs
- XslTransform.cs
- RegistryDataKey.cs
- NetworkInformationException.cs
- ClassicBorderDecorator.cs
- SectionUpdates.cs
- Pen.cs
- ECDsaCng.cs
- FixedSOMTable.cs