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
- NetworkCredential.cs
- CursorConverter.cs
- ContentType.cs
- RadioButtonList.cs
- VScrollBar.cs
- DecoderReplacementFallback.cs
- SynchronizingStream.cs
- BroadcastEventHelper.cs
- DataGridViewSelectedRowCollection.cs
- VariableExpressionConverter.cs
- SerializerProvider.cs
- DockingAttribute.cs
- HelloOperationAsyncResult.cs
- MatrixTransform3D.cs
- ArithmeticException.cs
- XmlSchemaChoice.cs
- CompilerGlobalScopeAttribute.cs
- QuaternionValueSerializer.cs
- SecurityChannel.cs
- SynchronizedPool.cs
- Literal.cs
- HashRepartitionStream.cs
- DBDataPermissionAttribute.cs
- PerformanceCounterPermission.cs
- WindowVisualStateTracker.cs
- OutputCacheProfile.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- StackSpiller.Bindings.cs
- RecognizedAudio.cs
- SignedXmlDebugLog.cs
- COM2IDispatchConverter.cs
- CalloutQueueItem.cs
- QueryContext.cs
- DecimalConverter.cs
- BrushConverter.cs
- RowToParametersTransformer.cs
- DataColumn.cs
- SQLBinaryStorage.cs
- ConfigurationSection.cs
- PlatformNotSupportedException.cs
- ParamArrayAttribute.cs
- HttpRuntime.cs
- FontNamesConverter.cs
- ProgramPublisher.cs
- LoginCancelEventArgs.cs
- QuaternionAnimationBase.cs
- DecimalStorage.cs
- ProxyWebPartConnectionCollection.cs
- Registry.cs
- _Events.cs
- CodeConstructor.cs
- ProxyWebPartConnectionCollection.cs
- ServiceProviders.cs
- ScriptBehaviorDescriptor.cs
- MarkupExtensionSerializer.cs
- FixedStringLookup.cs
- DataExpression.cs
- ObjectSpanRewriter.cs
- GridEntry.cs
- ProfilePropertySettingsCollection.cs
- Util.cs
- KeyedHashAlgorithm.cs
- IISUnsafeMethods.cs
- BoolExpr.cs
- ContractHandle.cs
- XPathBuilder.cs
- EntityTransaction.cs
- ExpressionPrefixAttribute.cs
- ConfigurationValidatorAttribute.cs
- CollectionViewGroupRoot.cs
- SchemaObjectWriter.cs
- StateMachineHelpers.cs
- FixedDSBuilder.cs
- returneventsaver.cs
- RectKeyFrameCollection.cs
- Rect3D.cs
- AttributeQuery.cs
- HttpWrapper.cs
- FileDialog_Vista.cs
- AuthenticationServiceManager.cs
- MethodRental.cs
- SafeFileMapViewHandle.cs
- StreamingContext.cs
- HttpListenerRequestTraceRecord.cs
- Substitution.cs
- ToolStripMenuItem.cs
- DataKeyCollection.cs
- BinaryUtilClasses.cs
- StylusButtonCollection.cs
- SmiRequestExecutor.cs
- BindStream.cs
- CheckBoxAutomationPeer.cs
- DeviceOverridableAttribute.cs
- BypassElement.cs
- ClientCredentialsSecurityTokenManager.cs
- DeviceContext.cs
- ScaleTransform.cs
- DesignerAttribute.cs
- RelatedPropertyManager.cs
- CollectionExtensions.cs