Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // 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); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- OdbcParameterCollection.cs
- PathFigureCollection.cs
- Send.cs
- XmlBuffer.cs
- KeyConstraint.cs
- WebContext.cs
- BitmapMetadataEnumerator.cs
- ItemContainerPattern.cs
- SQLByte.cs
- PropertyTabAttribute.cs
- CodeSnippetExpression.cs
- TypeContext.cs
- SplitterCancelEvent.cs
- OverrideMode.cs
- IsolatedStorageException.cs
- ExpressionCopier.cs
- XmlSchemaInfo.cs
- TextTabProperties.cs
- AspNetRouteServiceHttpHandler.cs
- RestHandler.cs
- DataSourceComponent.cs
- DataGridViewColumnEventArgs.cs
- TraceXPathNavigator.cs
- AnimationLayer.cs
- SetStateEventArgs.cs
- HttpRawResponse.cs
- Property.cs
- UserControlParser.cs
- DataBoundControlAdapter.cs
- CodeBinaryOperatorExpression.cs
- ClientSettingsProvider.cs
- HtmlControlPersistable.cs
- loginstatus.cs
- IntranetCredentialPolicy.cs
- IdentityElement.cs
- ParserExtension.cs
- OLEDB_Util.cs
- ClientSession.cs
- HtmlValidationSummaryAdapter.cs
- SingleObjectCollection.cs
- ChtmlImageAdapter.cs
- HttpBrowserCapabilitiesWrapper.cs
- DispatcherOperation.cs
- XmlSiteMapProvider.cs
- ContainerParaClient.cs
- ItemAutomationPeer.cs
- ConvertersCollection.cs
- DATA_BLOB.cs
- ScriptingProfileServiceSection.cs
- Point3DValueSerializer.cs
- RadioButton.cs
- VScrollProperties.cs
- basecomparevalidator.cs
- InheritablePropertyChangeInfo.cs
- StorageTypeMapping.cs
- BooleanAnimationUsingKeyFrames.cs
- DataConnectionHelper.cs
- DataBindingExpressionBuilder.cs
- XmlNavigatorStack.cs
- DataContractSerializerElement.cs
- DescendantQuery.cs
- SqlResolver.cs
- Int32.cs
- Internal.cs
- peersecurityelement.cs
- HtmlToClrEventProxy.cs
- XmlConvert.cs
- Thickness.cs
- ResourceWriter.cs
- PagePropertiesChangingEventArgs.cs
- TextParagraphView.cs
- PeerCollaboration.cs
- ViewBase.cs
- CodeArrayIndexerExpression.cs
- ActivityPreviewDesigner.cs
- SecurityPolicyVersion.cs
- DesignUtil.cs
- MetaType.cs
- EventManager.cs
- ProcessHostMapPath.cs
- NativeMethods.cs
- _AutoWebProxyScriptEngine.cs
- XmlILAnnotation.cs
- ApplicationInfo.cs
- IsolatedStorageFilePermission.cs
- ControlHelper.cs
- WebBrowsableAttribute.cs
- Rule.cs
- SolidColorBrush.cs
- ButtonBase.cs
- EraserBehavior.cs
- MetabaseSettingsIis7.cs
- Size3D.cs
- SQLResource.cs
- CheckedListBox.cs
- DependencyObjectProvider.cs
- PolygonHotSpot.cs
- DataControlFieldHeaderCell.cs
- XmlSchemaAnnotation.cs
- BStrWrapper.cs