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
- XmlSecureResolver.cs
- TcpHostedTransportConfiguration.cs
- XmlRawWriterWrapper.cs
- SpecialFolderEnumConverter.cs
- ToolStripRenderEventArgs.cs
- TextRunCacheImp.cs
- HandleCollector.cs
- WindowsToolbar.cs
- HitTestWithGeometryDrawingContextWalker.cs
- _KerberosClient.cs
- GlyphInfoList.cs
- WorkflowApplication.cs
- SqlDataSourceSelectingEventArgs.cs
- _SslState.cs
- Root.cs
- WorkflowServiceBehavior.cs
- Util.cs
- controlskin.cs
- TextContainer.cs
- XmlNodeChangedEventArgs.cs
- PeerName.cs
- XamlTypeMapperSchemaContext.cs
- PageWrapper.cs
- ProbeDuplex11AsyncResult.cs
- ApplicationDirectory.cs
- WhitespaceReader.cs
- DataPagerCommandEventArgs.cs
- NullableIntMinMaxAggregationOperator.cs
- HierarchicalDataSourceControl.cs
- ProtocolProfile.cs
- CultureSpecificStringDictionary.cs
- DesignerTextWriter.cs
- Function.cs
- RegexGroupCollection.cs
- tooltip.cs
- ToolBarOverflowPanel.cs
- DataRelationPropertyDescriptor.cs
- FunctionImportMapping.cs
- TabControlEvent.cs
- GeometryCombineModeValidation.cs
- ComponentResourceKeyConverter.cs
- DrawingState.cs
- BooleanExpr.cs
- AttachedPropertyMethodSelector.cs
- ProfileManager.cs
- SerializableTypeCodeDomSerializer.cs
- _CommandStream.cs
- SizeF.cs
- RequestCacheManager.cs
- AuthenticationService.cs
- ValidationHelper.cs
- ResizingMessageFilter.cs
- SoapSchemaMember.cs
- XmlNavigatorFilter.cs
- DecimalAnimation.cs
- PropertyTab.cs
- GridViewCommandEventArgs.cs
- LongTypeConverter.cs
- CommandHelpers.cs
- DataControlButton.cs
- ColumnMapCopier.cs
- TraceLevelHelper.cs
- FormViewUpdatedEventArgs.cs
- InputDevice.cs
- WindowsFormsEditorServiceHelper.cs
- InvalidTimeZoneException.cs
- HwndAppCommandInputProvider.cs
- SymmetricSecurityProtocolFactory.cs
- IdentityNotMappedException.cs
- AnnotationResourceChangedEventArgs.cs
- PropertyChangedEventArgs.cs
- StylusButton.cs
- OpCodes.cs
- BaseDataBoundControl.cs
- KnownColorTable.cs
- RefreshPropertiesAttribute.cs
- ListViewSelectEventArgs.cs
- FontCollection.cs
- JsonEncodingStreamWrapper.cs
- Exceptions.cs
- NotifyParentPropertyAttribute.cs
- PropertyDescriptorComparer.cs
- QuaternionIndependentAnimationStorage.cs
- Membership.cs
- JsonServiceDocumentSerializer.cs
- SerializableAttribute.cs
- BinaryObjectWriter.cs
- UntypedNullExpression.cs
- Root.cs
- ProcessStartInfo.cs
- BamlReader.cs
- SID.cs
- Model3D.cs
- StringExpressionSet.cs
- ComAdminInterfaces.cs
- HttpApplicationFactory.cs
- ServiceModelStringsVersion1.cs
- SwitchCase.cs
- Geometry.cs
- UrlPath.cs