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
- ConnectionStringSettingsCollection.cs
- MenuItemCollectionEditorDialog.cs
- LocalIdCollection.cs
- StrongName.cs
- ListBindingConverter.cs
- AncestorChangedEventArgs.cs
- TextSyndicationContentKindHelper.cs
- JsonQueryStringConverter.cs
- Button.cs
- LambdaCompiler.Lambda.cs
- TypeBrowser.xaml.cs
- SpellerError.cs
- WsdlImporter.cs
- CodeExporter.cs
- ObjectStateFormatter.cs
- AsymmetricAlgorithm.cs
- TypeInformation.cs
- Camera.cs
- ExcludePathInfo.cs
- PropertyDescriptor.cs
- ThemeInfoAttribute.cs
- DoubleIndependentAnimationStorage.cs
- TreePrinter.cs
- EntityKeyElement.cs
- HybridObjectCache.cs
- DataSetSchema.cs
- ClientSettingsStore.cs
- XappLauncher.cs
- storepermission.cs
- AppDomainManager.cs
- MessageDecoder.cs
- CqlParser.cs
- ListViewGroupConverter.cs
- RoutedEventArgs.cs
- BamlStream.cs
- FormattedTextSymbols.cs
- InvalidCardException.cs
- SafeBitVector32.cs
- XamlPathDataSerializer.cs
- ListBase.cs
- PresentationUIStyleResources.cs
- ApplicationInterop.cs
- Site.cs
- StreamGeometry.cs
- DataControlFieldsEditor.cs
- TreeViewEvent.cs
- OracleEncoding.cs
- InvalidWMPVersionException.cs
- OptimalBreakSession.cs
- PackageProperties.cs
- DispatcherHooks.cs
- SerializationAttributes.cs
- HtmlString.cs
- XmlWellformedWriter.cs
- DetailsViewDeleteEventArgs.cs
- XmlDesigner.cs
- ModelUIElement3D.cs
- WinFormsSecurity.cs
- _ShellExpression.cs
- FormsAuthenticationEventArgs.cs
- RotateTransform.cs
- TdsRecordBufferSetter.cs
- BatchWriter.cs
- Dispatcher.cs
- Point3DCollection.cs
- ToolStripButton.cs
- BStrWrapper.cs
- BindingValueChangedEventArgs.cs
- LogManagementAsyncResult.cs
- UpdateRecord.cs
- ContextStaticAttribute.cs
- PointConverter.cs
- BufferAllocator.cs
- ExceptionAggregator.cs
- TdsParserSafeHandles.cs
- LineBreakRecord.cs
- DbConnectionClosed.cs
- CommonDialog.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- ReadOnlyDictionary.cs
- PointConverter.cs
- UnionCodeGroup.cs
- DockPanel.cs
- NumberSubstitution.cs
- TreeViewDesigner.cs
- HTTPAPI_VERSION.cs
- Attributes.cs
- WebPartDisplayModeEventArgs.cs
- ResourcesBuildProvider.cs
- WindowsImpersonationContext.cs
- SweepDirectionValidation.cs
- ByteFacetDescriptionElement.cs
- PanelDesigner.cs
- FtpCachePolicyElement.cs
- QilXmlWriter.cs
- templategroup.cs
- Stylesheet.cs
- ClusterRegistryConfigurationProvider.cs
- OleStrCAMarshaler.cs
- HtmlFormAdapter.cs