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
- ScrollViewerAutomationPeer.cs
- LambdaCompiler.Lambda.cs
- AssemblyName.cs
- InteropExecutor.cs
- SynchronousChannelMergeEnumerator.cs
- ProjectionPruner.cs
- COM2EnumConverter.cs
- TrackingMemoryStreamFactory.cs
- KeyInstance.cs
- ConstructorNeedsTagAttribute.cs
- XmlnsCompatibleWithAttribute.cs
- DriveInfo.cs
- EntityParameterCollection.cs
- HtmlButton.cs
- FillBehavior.cs
- WmlValidationSummaryAdapter.cs
- SByte.cs
- ProgressBarRenderer.cs
- StringConcat.cs
- ProcessMonitor.cs
- HyperLinkStyle.cs
- updatecommandorderer.cs
- DataSourceHelper.cs
- ProcessModelInfo.cs
- LabelDesigner.cs
- KeyboardDevice.cs
- RenderDataDrawingContext.cs
- CapabilitiesPattern.cs
- SafeSecurityHandles.cs
- ExtenderControl.cs
- ModelItemExtensions.cs
- Int32Storage.cs
- HtmlControlPersistable.cs
- TextReader.cs
- XmlWrappingWriter.cs
- VolatileEnlistmentState.cs
- SecurityPolicySection.cs
- HttpCacheVaryByContentEncodings.cs
- FormViewInsertEventArgs.cs
- SymmetricKey.cs
- TextTreeDeleteContentUndoUnit.cs
- SqlTransaction.cs
- XmlObjectSerializerReadContextComplexJson.cs
- IntSecurity.cs
- mactripleDES.cs
- EventDescriptorCollection.cs
- Compiler.cs
- Message.cs
- ItemsControlAutomationPeer.cs
- StatusBarAutomationPeer.cs
- DrawingContext.cs
- PerspectiveCamera.cs
- ExpressionCopier.cs
- SizeFConverter.cs
- RelationshipFixer.cs
- WindowsRegion.cs
- DiscoveryDocumentSerializer.cs
- QilFactory.cs
- NestPullup.cs
- _Win32.cs
- CoordinationService.cs
- TextEditorCharacters.cs
- CodeValidator.cs
- WizardStepBase.cs
- AmbientProperties.cs
- DataGrid.cs
- ListViewSortEventArgs.cs
- SecurityManager.cs
- FragmentNavigationEventArgs.cs
- DragDropManager.cs
- RegexCharClass.cs
- XmlEnumAttribute.cs
- TakeOrSkipWhileQueryOperator.cs
- HostProtectionPermission.cs
- KeyManager.cs
- ReaderContextStackData.cs
- EntitySqlException.cs
- HttpModuleActionCollection.cs
- PeerMaintainer.cs
- InputQueueChannelAcceptor.cs
- WsatServiceCertificate.cs
- RawStylusInputCustomData.cs
- ForceCopyBuildProvider.cs
- AssemblyNameProxy.cs
- BitmapMetadataBlob.cs
- ControlTemplate.cs
- TemplateInstanceAttribute.cs
- BindingCompleteEventArgs.cs
- AssemblyHash.cs
- StaticFileHandler.cs
- MarginCollapsingState.cs
- MemberCollection.cs
- XPathDocument.cs
- Matrix3DValueSerializer.cs
- SystemShuttingDownException.cs
- EntityClassGenerator.cs
- DependencyPropertyConverter.cs
- TypeContext.cs
- IDQuery.cs
- RenderTargetBitmap.cs