Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / clr / src / BCL / System / Security / Cryptography / PKCS1MaskGenerationMethod.cs / 1 / PKCS1MaskGenerationMethod.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== namespace System.Security.Cryptography { [System.Runtime.InteropServices.ComVisible(true)] public class PKCS1MaskGenerationMethod : MaskGenerationMethod { private String HashNameValue; // // public constructors // public PKCS1MaskGenerationMethod() { HashNameValue = "SHA1"; } // // public properties // public String HashName { get { return HashNameValue; } set { HashNameValue = value; if (HashNameValue == null) { HashNameValue = "SHA1"; } } } // // public methods // public override byte[] GenerateMask(byte[] rgbSeed, int cbReturn) { HashAlgorithm hash = (HashAlgorithm) CryptoConfig.CreateFromName(HashNameValue); byte[] rgbCounter = new byte[4]; byte[] rgbT = new byte[cbReturn]; uint counter = 0; for (int ib=0; ib_hash.Length) { Buffer.BlockCopy(_hash, 0, rgbT, ib, _hash.Length); } else { Buffer.BlockCopy(_hash, 0, rgbT, ib, rgbT.Length - ib); } ib += hash.Hash.Length; } return rgbT; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Predicate.cs
- _CookieModule.cs
- ComboBox.cs
- BaseValidator.cs
- ConstraintStruct.cs
- FormsAuthenticationCredentials.cs
- SafeFileMapViewHandle.cs
- DataGridClipboardCellContent.cs
- PackageRelationshipCollection.cs
- DocobjHost.cs
- MailDefinition.cs
- MetadataCacheItem.cs
- DataGridViewCellStyle.cs
- InputBinding.cs
- ConnectionStringEditor.cs
- SqlWriter.cs
- WindowsTitleBar.cs
- SqlInternalConnectionSmi.cs
- DecoratedNameAttribute.cs
- ButtonStandardAdapter.cs
- FileDialogCustomPlace.cs
- PathFigureCollectionValueSerializer.cs
- RequestCachePolicy.cs
- PublisherIdentityPermission.cs
- ToolStripProgressBar.cs
- MDIControlStrip.cs
- BlurEffect.cs
- SafeArrayRankMismatchException.cs
- SafeLocalMemHandle.cs
- FixedLineResult.cs
- NotificationContext.cs
- HtmlToClrEventProxy.cs
- WindowsComboBox.cs
- ResourceCollectionInfo.cs
- TargetInvocationException.cs
- SerializableAttribute.cs
- AnnotationHighlightLayer.cs
- RevocationPoint.cs
- NameTable.cs
- TreeView.cs
- CreateRefExpr.cs
- ApplicationActivator.cs
- DetailsViewUpdateEventArgs.cs
- ApplicationInterop.cs
- SerialStream.cs
- NestPullup.cs
- ConditionalAttribute.cs
- TypeGenericEnumerableViewSchema.cs
- XmlHierarchicalDataSourceView.cs
- ColorConvertedBitmap.cs
- Function.cs
- DesignerActionMethodItem.cs
- ChtmlTextWriter.cs
- IconConverter.cs
- _IPv6Address.cs
- PageContentAsyncResult.cs
- PageAsyncTaskManager.cs
- CreateUserWizardStep.cs
- Utils.cs
- ScrollBar.cs
- WindowsListViewScroll.cs
- Mapping.cs
- LineMetrics.cs
- GCHandleCookieTable.cs
- BaseProcessProtocolHandler.cs
- SQLChars.cs
- DbParameterCollection.cs
- ColumnWidthChangingEvent.cs
- DbProviderManifest.cs
- AnnouncementService.cs
- ExpressionBindingCollection.cs
- WizardForm.cs
- BooleanStorage.cs
- GeneralTransform3D.cs
- DispatcherOperation.cs
- CodeGenerator.cs
- SharedPersonalizationStateInfo.cs
- X509KeyIdentifierClauseType.cs
- SessionStateContainer.cs
- ErrorActivity.cs
- DetailsViewInsertEventArgs.cs
- Utils.cs
- ToolStripItemEventArgs.cs
- SafeBitVector32.cs
- _Events.cs
- TypeNameHelper.cs
- MetadataArtifactLoaderResource.cs
- PathFigureCollection.cs
- LongValidator.cs
- SingleKeyFrameCollection.cs
- SqlDataSourceQueryConverter.cs
- ProvidersHelper.cs
- TriggerCollection.cs
- PreviewPageInfo.cs
- Point.cs
- BatchParser.cs
- ScopelessEnumAttribute.cs
- JoinCqlBlock.cs
- EntityDataSourceSelectedEventArgs.cs
- OleDbConnection.cs