Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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; } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- QilStrConcat.cs
- MDIControlStrip.cs
- ClientRuntimeConfig.cs
- XPathSelfQuery.cs
- StorageSetMapping.cs
- FacetValueContainer.cs
- UserNamePasswordValidator.cs
- HttpCookiesSection.cs
- SignatureHelper.cs
- SerialPort.cs
- DefaultPrintController.cs
- RemoteWebConfigurationHostServer.cs
- WebPartEditorApplyVerb.cs
- AutomationInteropProvider.cs
- ContractSearchPattern.cs
- DynamicPropertyHolder.cs
- ConnectionStringSettings.cs
- TextInfo.cs
- StackSpiller.cs
- NumericUpDown.cs
- DynamicUpdateCommand.cs
- NativeBuffer.cs
- OleDbStruct.cs
- LogReserveAndAppendState.cs
- DragStartedEventArgs.cs
- SystemColors.cs
- CollectionChangedEventManager.cs
- PersistenceException.cs
- DataListItemEventArgs.cs
- TextTreePropertyUndoUnit.cs
- X509Certificate2Collection.cs
- ServiceModelSectionGroup.cs
- Formatter.cs
- EncodingInfo.cs
- ISFClipboardData.cs
- RuleSetDialog.cs
- SizeAnimationBase.cs
- TypeDescriptionProviderAttribute.cs
- FileIOPermission.cs
- XmlSerializationWriter.cs
- InlineObject.cs
- WindowsAuthenticationModule.cs
- ColumnBinding.cs
- ListViewInsertEventArgs.cs
- TemplateDefinition.cs
- XamlTypeMapperSchemaContext.cs
- HtmlSelectionListAdapter.cs
- UIServiceHelper.cs
- ObjectDataSourceDisposingEventArgs.cs
- WindowsTab.cs
- Bits.cs
- SystemSounds.cs
- ThreadPool.cs
- OleDbConnectionInternal.cs
- Walker.cs
- DeferredReference.cs
- MessageCredentialType.cs
- EntityDataSourceConfigureObjectContextPanel.cs
- CodeNamespaceImportCollection.cs
- XmlNamedNodeMap.cs
- DbProviderServices.cs
- AstTree.cs
- SecurityUtils.cs
- RoleServiceManager.cs
- SafeSecurityHelper.cs
- XamlTemplateSerializer.cs
- _IPv6Address.cs
- Schema.cs
- ChannelSinkStacks.cs
- SafeProcessHandle.cs
- SortableBindingList.cs
- HtmlInputImage.cs
- ChangeInterceptorAttribute.cs
- StrokeCollectionConverter.cs
- X509UI.cs
- CommonDialog.cs
- FrameworkContentElement.cs
- SchemaTableOptionalColumn.cs
- XmlSchemaExporter.cs
- _SecureChannel.cs
- DataSourceBooleanViewSchemaConverter.cs
- ProfileEventArgs.cs
- updateconfighost.cs
- HTMLTextWriter.cs
- RegionData.cs
- GridViewRowCollection.cs
- SiteMapHierarchicalDataSourceView.cs
- DataColumnMappingCollection.cs
- LocalClientSecuritySettingsElement.cs
- _ConnectStream.cs
- DataContractSerializerOperationFormatter.cs
- IconConverter.cs
- UserControlAutomationPeer.cs
- XmlCharacterData.cs
- WebControlParameterProxy.cs
- StartUpEventArgs.cs
- CustomSignedXml.cs
- ClientRuntime.cs
- InterleavedZipPartStream.cs
- Types.cs