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
- EventLogPermissionEntryCollection.cs
- TileBrush.cs
- TextDecorationCollectionConverter.cs
- DocumentsTrace.cs
- XmlDataDocument.cs
- ObjectListCommandEventArgs.cs
- RenamedEventArgs.cs
- ApplicationContext.cs
- GlyphRun.cs
- EdmItemCollection.cs
- ComponentRenameEvent.cs
- ValueUtilsSmi.cs
- PartitionedDataSource.cs
- SamlAttributeStatement.cs
- ZipIOCentralDirectoryFileHeader.cs
- DependencyObject.cs
- DropTarget.cs
- X509Utils.cs
- SegmentInfo.cs
- SurrogateEncoder.cs
- WasAdminWrapper.cs
- TableLayoutSettings.cs
- SiteMap.cs
- BlobPersonalizationState.cs
- OutputCacheProfile.cs
- StaticContext.cs
- AttributeProviderAttribute.cs
- MetadataCache.cs
- ReferenceService.cs
- Utils.cs
- LineBreakRecord.cs
- OutputCacheModule.cs
- SqlColumnizer.cs
- Frame.cs
- SiteMapSection.cs
- XmlBoundElement.cs
- SchemaMerger.cs
- SpeechSynthesizer.cs
- SqlRetyper.cs
- XmlSchemaSimpleType.cs
- CombinedGeometry.cs
- ViewGenResults.cs
- CommentEmitter.cs
- ClientUrlResolverWrapper.cs
- MarshalByValueComponent.cs
- PinnedBufferMemoryStream.cs
- LinqDataSourceDisposeEventArgs.cs
- _RequestCacheProtocol.cs
- RootAction.cs
- InputLanguage.cs
- ProjectedSlot.cs
- baseaxisquery.cs
- Trace.cs
- AuthenticatedStream.cs
- VisualStyleElement.cs
- ScriptReference.cs
- NamespaceInfo.cs
- SqlTypeConverter.cs
- ExpressionLink.cs
- AspProxy.cs
- WorkflowElementDialog.cs
- XmlConvert.cs
- CustomErrorsSectionWrapper.cs
- SqlDataSourceSelectingEventArgs.cs
- XsltArgumentList.cs
- SchemaDeclBase.cs
- PortCache.cs
- SmtpDigestAuthenticationModule.cs
- RepeatButton.cs
- DuplicateWaitObjectException.cs
- HttpEncoder.cs
- DeadCharTextComposition.cs
- TimeManager.cs
- DataGridViewCellStyleChangedEventArgs.cs
- HostProtectionPermission.cs
- ResponseStream.cs
- TerminatorSinks.cs
- ErrorLog.cs
- ToolStripItemClickedEventArgs.cs
- MatrixAnimationBase.cs
- ExpandSegment.cs
- HttpWebRequest.cs
- OleDbDataAdapter.cs
- DeviceContexts.cs
- CheckStoreFileValidityRequest.cs
- PropertyBuilder.cs
- CollectionViewSource.cs
- SizeConverter.cs
- Reference.cs
- ComponentResourceKey.cs
- GeneratedView.cs
- WsdlWriter.cs
- WebPartEditorApplyVerb.cs
- SQLChars.cs
- CompiledQuery.cs
- ClientBuildManager.cs
- ProcessHostFactoryHelper.cs
- CustomWebEventKey.cs
- MaterialCollection.cs
- ComponentEditorForm.cs