Code:
/ FX-1434 / FX-1434 / 1.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
- XmlSchemaImporter.cs
- CqlLexerHelpers.cs
- embossbitmapeffect.cs
- WaitHandle.cs
- HandlerBase.cs
- ValidationPropertyAttribute.cs
- OdbcTransaction.cs
- ValidatedControlConverter.cs
- basecomparevalidator.cs
- HMACSHA1.cs
- GraphicsPathIterator.cs
- AnnotationMap.cs
- SystemGatewayIPAddressInformation.cs
- XmlAttribute.cs
- XmlDataSourceView.cs
- oledbmetadatacolumnnames.cs
- ProtocolsSection.cs
- DesignerDataView.cs
- DbUpdateCommandTree.cs
- TaskResultSetter.cs
- TypeUsage.cs
- DeleteBookmarkScope.cs
- AsymmetricSignatureDeformatter.cs
- TransformPatternIdentifiers.cs
- SymbolEqualComparer.cs
- Ipv6Element.cs
- GuidConverter.cs
- SqlHelper.cs
- VisualTarget.cs
- DataGridViewElement.cs
- JsonClassDataContract.cs
- SqlClientMetaDataCollectionNames.cs
- RoleManagerEventArgs.cs
- TraceEventCache.cs
- DbProviderSpecificTypePropertyAttribute.cs
- InterleavedZipPartStream.cs
- SafeCloseHandleCritical.cs
- HttpApplication.cs
- SafeCertificateContext.cs
- XmlSchemaSimpleTypeRestriction.cs
- Border.cs
- SecurityState.cs
- ExpressionDumper.cs
- XmlNotation.cs
- FlowchartDesignerCommands.cs
- ParsedRoute.cs
- CatalogZoneDesigner.cs
- ProbeMatches11.cs
- Parameter.cs
- PathFigureCollectionValueSerializer.cs
- ConfigXmlWhitespace.cs
- ForwardPositionQuery.cs
- LinqDataSourceValidationException.cs
- TableLayoutRowStyleCollection.cs
- ProcessManager.cs
- DispatcherExceptionEventArgs.cs
- SurrogateEncoder.cs
- WebUtil.cs
- XmlReader.cs
- MonitorWrapper.cs
- AspNetCacheProfileAttribute.cs
- PersonalizationProviderCollection.cs
- CompilationUtil.cs
- DecoderExceptionFallback.cs
- DSACryptoServiceProvider.cs
- SelectionHighlightInfo.cs
- ViewStateException.cs
- GetIndexBinder.cs
- PkcsUtils.cs
- KnownBoxes.cs
- RtfFormatStack.cs
- WebPartExportVerb.cs
- TemplateBindingExtension.cs
- StyleHelper.cs
- CodeTypeDeclarationCollection.cs
- TripleDES.cs
- GenericEnumConverter.cs
- WindowsRegion.cs
- ZipIOExtraField.cs
- ColumnMapTranslator.cs
- AuditLog.cs
- HtmlProps.cs
- Model3DCollection.cs
- CredentialSelector.cs
- DecimalAnimationUsingKeyFrames.cs
- DirectoryObjectSecurity.cs
- PersonalizationStateInfo.cs
- MediaCommands.cs
- TimeSpanStorage.cs
- RelOps.cs
- ConstrainedDataObject.cs
- HtmlShimManager.cs
- TypeBinaryExpression.cs
- GroupStyle.cs
- WindowVisualStateTracker.cs
- AdornerLayer.cs
- DataStorage.cs
- XmlSchemaObject.cs
- PersistenceTypeAttribute.cs
- Visual3D.cs