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
- MatrixKeyFrameCollection.cs
- DesignTimeVisibleAttribute.cs
- UnitySerializationHolder.cs
- ProcessHostFactoryHelper.cs
- ConfigPathUtility.cs
- GenericTypeParameterBuilder.cs
- DynamicControl.cs
- OdbcParameter.cs
- Line.cs
- UpdatePanel.cs
- TextEncodedRawTextWriter.cs
- DomainUpDown.cs
- BitmapInitialize.cs
- SessionStateModule.cs
- WebCategoryAttribute.cs
- SchemaElement.cs
- SapiAttributeParser.cs
- CodeConstructor.cs
- Baml2006Reader.cs
- DeadLetterQueue.cs
- EventlogProvider.cs
- PagePropertiesChangingEventArgs.cs
- SudsParser.cs
- Attributes.cs
- ChannelManager.cs
- FileDialogCustomPlace.cs
- ChtmlTextWriter.cs
- DocumentApplicationJournalEntry.cs
- DockAndAnchorLayout.cs
- DataGridViewTextBoxEditingControl.cs
- ToolZoneDesigner.cs
- MenuAutomationPeer.cs
- CompoundFileIOPermission.cs
- WebBrowserUriTypeConverter.cs
- MemoryFailPoint.cs
- TimeZone.cs
- ProfileInfo.cs
- EpmSourceTree.cs
- RequestNavigateEventArgs.cs
- VisualCollection.cs
- ConfigurationManagerInternal.cs
- ImageButton.cs
- WindowsGraphics.cs
- ScriptingSectionGroup.cs
- SqlInternalConnectionSmi.cs
- CompiledRegexRunner.cs
- DBSqlParserTableCollection.cs
- Identity.cs
- PriorityChain.cs
- CompiledRegexRunnerFactory.cs
- RoutedEventValueSerializer.cs
- SpellerStatusTable.cs
- XmlnsCompatibleWithAttribute.cs
- PagesSection.cs
- DataGridViewCellStyle.cs
- LexicalChunk.cs
- DecimalConverter.cs
- Attributes.cs
- XmlSecureResolver.cs
- FieldToken.cs
- EncryptedType.cs
- JsonReaderDelegator.cs
- _ProxyChain.cs
- StreamReader.cs
- ButtonBase.cs
- StickyNoteAnnotations.cs
- TableLayoutStyle.cs
- BufferCache.cs
- CodeConstructor.cs
- GPRECTF.cs
- validation.cs
- MultiByteCodec.cs
- WS2007HttpBindingCollectionElement.cs
- _ConnectOverlappedAsyncResult.cs
- AdjustableArrowCap.cs
- TextEncodedRawTextWriter.cs
- WindowsTooltip.cs
- ControlsConfig.cs
- CodeAttributeArgumentCollection.cs
- CompensationToken.cs
- FixUpCollection.cs
- X509CertificateCollection.cs
- SerTrace.cs
- Pen.cs
- IfJoinedCondition.cs
- JsonQNameDataContract.cs
- VisualBrush.cs
- ColumnResizeUndoUnit.cs
- EndPoint.cs
- WpfKnownType.cs
- RemotingServices.cs
- CleanUpVirtualizedItemEventArgs.cs
- GradientStop.cs
- BufferedStream.cs
- CodeDomLoader.cs
- WindowsFormsSynchronizationContext.cs
- DocumentViewerHelper.cs
- CommandBinding.cs
- KeyTime.cs
- HostedImpersonationContext.cs