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
- TreeNodeBinding.cs
- DataGridViewAdvancedBorderStyle.cs
- SetterBase.cs
- DropAnimation.xaml.cs
- KeyValueSerializer.cs
- AdapterUtil.cs
- BitVector32.cs
- FlowLayoutPanel.cs
- TextEndOfSegment.cs
- SortedDictionary.cs
- NamedElement.cs
- ArrayElementGridEntry.cs
- MultidimensionalArrayItemReference.cs
- PngBitmapDecoder.cs
- FrugalList.cs
- HashSetDebugView.cs
- XPathNodePointer.cs
- ConnectionPoint.cs
- RoleManagerEventArgs.cs
- AlternateViewCollection.cs
- InstanceNormalEvent.cs
- SQLString.cs
- Win32KeyboardDevice.cs
- WorkflowServiceNamespace.cs
- Ops.cs
- AnimationLayer.cs
- FormatterConverter.cs
- TemplateXamlParser.cs
- XPathSelfQuery.cs
- PropertyDescriptors.cs
- HostProtectionPermission.cs
- TrackingMemoryStream.cs
- FixUpCollection.cs
- XmlDictionaryReaderQuotas.cs
- BuildManagerHost.cs
- CapabilitiesAssignment.cs
- ScriptResourceInfo.cs
- FileIOPermission.cs
- Serializer.cs
- ArithmeticException.cs
- MenuTracker.cs
- SingleAnimation.cs
- RecordManager.cs
- ArgumentException.cs
- ModelVisual3D.cs
- ConfigurationException.cs
- RequestQueue.cs
- FlowDocument.cs
- ReferenceSchema.cs
- KnownBoxes.cs
- TreeViewImageKeyConverter.cs
- DesignerLoader.cs
- ProcessManager.cs
- DataGridViewCellStateChangedEventArgs.cs
- SqlNamer.cs
- TypeResolvingOptions.cs
- StandardCommands.cs
- ProxyWebPartManager.cs
- RuntimeHelpers.cs
- HttpPostClientProtocol.cs
- DataSvcMapFileSerializer.cs
- EntityTypeBase.cs
- Cursor.cs
- PropertyTab.cs
- DataServiceRequestException.cs
- ScaleTransform3D.cs
- WebPartDisplayModeCancelEventArgs.cs
- Storyboard.cs
- ColumnMapTranslator.cs
- CryptoApi.cs
- ResourceWriter.cs
- FontSourceCollection.cs
- PrincipalPermission.cs
- DataStorage.cs
- JapaneseLunisolarCalendar.cs
- FileInfo.cs
- BitmapData.cs
- ProtocolImporter.cs
- PropertyGridCommands.cs
- PeerNameRegistration.cs
- EpmCustomContentWriterNodeData.cs
- SendContent.cs
- RsaSecurityTokenAuthenticator.cs
- CodeVariableReferenceExpression.cs
- EventLogPermissionAttribute.cs
- TagPrefixCollection.cs
- WebUtil.cs
- FixedPageAutomationPeer.cs
- Drawing.cs
- CounterSampleCalculator.cs
- SettingsBase.cs
- Keywords.cs
- FileDialog_Vista_Interop.cs
- IdentityNotMappedException.cs
- VersionedStreamOwner.cs
- TextTreeUndoUnit.cs
- AssociationSetMetadata.cs
- KeyPullup.cs
- DataGridViewRowPrePaintEventArgs.cs
- DragEvent.cs