├── .gitignore ├── LICENSE ├── README.md ├── Sorlov.PowerShell.ExeBuilder ├── BuilderForm.Designer.cs ├── BuilderForm.cs ├── BuilderForm.resx ├── ComboListItem.cs ├── CrossThreadHelper.cs ├── Program.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── Resources │ └── exe.ico ├── Sorlov.PowerShell.Builder.csproj └── app.config ├── Sorlov.PowerShell.HTTPHandler ├── PSPProcessor.cs ├── Properties │ └── AssemblyInfo.cs └── Sorlov.PowerShell.HTTPHandler.csproj ├── Sorlov.PowerShell.sln ├── Sorlov.PowerShell ├── Checks │ ├── CheckCount.cs │ ├── CheckDirectoryExists.cs │ ├── CheckEmail.cs │ ├── CheckFileExists.cs │ ├── CheckFileExtension.cs │ ├── CheckFileReadable.cs │ ├── CheckFileSize.cs │ ├── CheckFileWriteable.cs │ ├── CheckLength.cs │ ├── CheckNotNull.cs │ ├── CheckNotNullOrEmpty.cs │ ├── CheckPathExists.cs │ ├── CheckPattern.cs │ ├── CheckRange.cs │ ├── CheckSet.cs │ ├── CheckType.cs │ └── CheckValidationException.cs ├── CmdLets │ ├── AddAssembly.cs │ ├── AddHostEntry.cs │ ├── BlockMutex.cs │ ├── ConvertFromExcel.cs │ ├── ConvertFromWord.cs │ ├── ConvertToHtApp.cs │ ├── ConvertXMLtoJSON.cs │ ├── DisableWindowControlBox.cs │ ├── EnableWindowControlBox.cs │ ├── ExitPSEnviroment.cs │ ├── ExpandZIPFile.cs │ ├── FindCertificate.cs │ ├── GetAdfsToken.cs │ ├── GetAdminStatus.cs │ ├── GetAssembly.cs │ ├── GetBatman.cs │ ├── GetDesktopColor.cs │ ├── GetHTTPHeaders.cs │ ├── GetHostEntry.cs │ ├── GetHostInfo.cs │ ├── GetNotifyIcon.cs │ ├── GetOfficeVersion.cs │ ├── GetRandomFile.cs │ ├── GetSelfHostedPS.cs │ ├── GetTail.cs │ ├── GetWindow.cs │ ├── ImportExcelWorkbook.cs │ ├── ImportHTML.cs │ ├── ImportOpenExcelWorkbook.cs │ ├── InitializePSDocumentation.cs │ ├── InvokeAsProcess.cs │ ├── InvokeAsSystem.cs │ ├── InvokeElevated.cs │ ├── InvokeHTApp.cs │ ├── InvokeNote.cs │ ├── InvokeParalellForeach.cs │ ├── MergeXMLFile.cs │ ├── NewBase64Image.cs │ ├── NewCertificate.cs │ ├── NewNotifyIcon.cs │ ├── NewReparsePoint.cs │ ├── NewSelfHostedHTApp.cs │ ├── NewSelfHostedPS.cs │ ├── NewXSDfromXML.cs │ ├── NewZIPFile.cs │ ├── OutAutoExcel.cs │ ├── OutAutoWord.cs │ ├── OutOpenExcel.cs │ ├── OutOpenWord.cs │ ├── RegisterHTApps.cs │ ├── RemoveAlias.cs │ ├── RemoveHostEntry.cs │ ├── RemoveNotifyIcon.cs │ ├── RemoveReparsePoint.cs │ ├── ResolveReparsePoint.cs │ ├── RestartPowerShell.cs │ ├── SelectAlive.cs │ ├── SetDesktopColor.cs │ ├── SetNotifyIcon.cs │ ├── SetWindow.cs │ ├── SetWindowTransparency.cs │ ├── ShowBalloon.cs │ ├── TestIPPort.cs │ ├── TestInternetConnection.cs │ ├── TestReparsePoint.cs │ ├── TestSMTPServer.cs │ └── UnblockMutex.cs ├── Dto │ ├── Adfs │ │ └── AdfsAudience.cs │ ├── ApplicationVersion.cs │ ├── MicrosoftLive │ │ └── OneDriveItem.cs │ ├── MicrosoftOffice │ │ ├── RowCollection.cs │ │ ├── RowCollectionEnumerator.cs │ │ ├── Workbook.cs │ │ ├── Worksheet.cs │ │ ├── WorksheetCollection.cs │ │ └── WorksheetsEnumerator.cs │ ├── Network │ │ ├── HTTPHeaderResult.cs │ │ ├── HostEntry.cs │ │ ├── HostEntryCollection.cs │ │ ├── HostEntryEnumerator.cs │ │ ├── HostInfo.cs │ │ ├── IPTestPortResult.cs │ │ └── SMTPConversationResult.cs │ ├── VersionInformation.cs │ └── WindowInformation.cs ├── Extensions │ └── EnumExtensions.cs ├── Initializer.cs ├── Lib │ ├── API │ │ ├── ADVAPI32.cs │ │ ├── CRYPT32.cs │ │ ├── CRYPTUI.cs │ │ ├── DWMAPI.cs │ │ ├── KERNEL32.cs │ │ ├── USER32.cs │ │ └── WININET.cs │ ├── Application │ │ ├── ApplicationData.cs │ │ ├── CallerProxy.cs │ │ ├── CallerProxyEventArgs.cs │ │ ├── Compiler.cs │ │ ├── Framework.cs │ │ ├── Platform.cs │ │ ├── ServiceData.cs │ │ ├── SigningInformation.cs │ │ └── ThreadMode.cs │ ├── BZip2 │ │ ├── BZip2Constants.cs │ │ ├── CBZip2InputStream.cs │ │ ├── CBZip2OutputStream.cs │ │ └── CRC.cs │ ├── BouncyCastle │ │ ├── asn1 │ │ │ ├── ASN1Generator.cs │ │ │ ├── ASN1OctetStringParser.cs │ │ │ ├── ASN1SequenceParser.cs │ │ │ ├── ASN1SetParser.cs │ │ │ ├── ASN1StreamParser.cs │ │ │ ├── ASN1TaggedObjectParser.cs │ │ │ ├── Asn1Encodable.cs │ │ │ ├── Asn1EncodableVector.cs │ │ │ ├── Asn1Exception.cs │ │ │ ├── Asn1InputStream.cs │ │ │ ├── Asn1Null.cs │ │ │ ├── Asn1Object.cs │ │ │ ├── Asn1OctetString.cs │ │ │ ├── Asn1OutputStream.cs │ │ │ ├── Asn1ParsingException.cs │ │ │ ├── Asn1Sequence.cs │ │ │ ├── Asn1Set.cs │ │ │ ├── Asn1TaggedObject.cs │ │ │ ├── Asn1Tags.cs │ │ │ ├── BERGenerator.cs │ │ │ ├── BEROctetStringGenerator.cs │ │ │ ├── BEROctetStringParser.cs │ │ │ ├── BERSequenceGenerator.cs │ │ │ ├── BERSequenceParser.cs │ │ │ ├── BERSetGenerator.cs │ │ │ ├── BERSetParser.cs │ │ │ ├── BERTaggedObjectParser.cs │ │ │ ├── BerApplicationSpecific.cs │ │ │ ├── BerApplicationSpecificParser.cs │ │ │ ├── BerNull.cs │ │ │ ├── BerOctetString.cs │ │ │ ├── BerOutputStream.cs │ │ │ ├── BerSequence.cs │ │ │ ├── BerSet.cs │ │ │ ├── BerTaggedObject.cs │ │ │ ├── ConstructedOctetStream.cs │ │ │ ├── DERExternal.cs │ │ │ ├── DERExternalParser.cs │ │ │ ├── DERGenerator.cs │ │ │ ├── DEROctetStringParser.cs │ │ │ ├── DERSequenceGenerator.cs │ │ │ ├── DERSequenceParser.cs │ │ │ ├── DERSetGenerator.cs │ │ │ ├── DERSetParser.cs │ │ │ ├── DefiniteLengthInputStream.cs │ │ │ ├── DerApplicationSpecific.cs │ │ │ ├── DerBMPString.cs │ │ │ ├── DerBitString.cs │ │ │ ├── DerBoolean.cs │ │ │ ├── DerEnumerated.cs │ │ │ ├── DerGeneralString.cs │ │ │ ├── DerGeneralizedTime.cs │ │ │ ├── DerIA5String.cs │ │ │ ├── DerInteger.cs │ │ │ ├── DerNull.cs │ │ │ ├── DerNumericString.cs │ │ │ ├── DerObjectIdentifier.cs │ │ │ ├── DerOctetString.cs │ │ │ ├── DerOutputStream.cs │ │ │ ├── DerPrintableString.cs │ │ │ ├── DerSequence.cs │ │ │ ├── DerSet.cs │ │ │ ├── DerStringBase.cs │ │ │ ├── DerT61String.cs │ │ │ ├── DerTaggedObject.cs │ │ │ ├── DerUTCTime.cs │ │ │ ├── DerUTF8String.cs │ │ │ ├── DerUniversalString.cs │ │ │ ├── DerUnknownTag.cs │ │ │ ├── DerVisibleString.cs │ │ │ ├── IAsn1ApplicationSpecificParser.cs │ │ │ ├── IAsn1Choice.cs │ │ │ ├── IAsn1Convertible.cs │ │ │ ├── IAsn1String.cs │ │ │ ├── IndefiniteLengthInputStream.cs │ │ │ ├── LazyASN1InputStream.cs │ │ │ ├── LazyDERSequence.cs │ │ │ ├── LazyDERSet.cs │ │ │ ├── LimitedInputStream.cs │ │ │ ├── OidTokenizer.cs │ │ │ ├── bc │ │ │ │ └── BCObjectIdentifiers.cs │ │ │ ├── cmp │ │ │ │ ├── CAKeyUpdAnnContent.cs │ │ │ │ ├── CertConfirmContent.cs │ │ │ │ ├── CertOrEncCert.cs │ │ │ │ ├── CertRepMessage.cs │ │ │ │ ├── CertResponse.cs │ │ │ │ ├── CertStatus.cs │ │ │ │ ├── CertifiedKeyPair.cs │ │ │ │ ├── Challenge.cs │ │ │ │ ├── CmpCertificate.cs │ │ │ │ ├── CmpObjectIdentifiers.cs │ │ │ │ ├── CrlAnnContent.cs │ │ │ │ ├── ErrorMsgContent.cs │ │ │ │ ├── GenMsgContent.cs │ │ │ │ ├── GenRepContent.cs │ │ │ │ ├── InfoTypeAndValue.cs │ │ │ │ ├── KeyRecRepContent.cs │ │ │ │ ├── OobCertHash.cs │ │ │ │ ├── PKIBody.cs │ │ │ │ ├── PKIConfirmContent.cs │ │ │ │ ├── PKIFailureInfo.cs │ │ │ │ ├── PKIFreeText.cs │ │ │ │ ├── PKIHeader.cs │ │ │ │ ├── PKIHeaderBuilder.cs │ │ │ │ ├── PKIMessage.cs │ │ │ │ ├── PKIMessages.cs │ │ │ │ ├── PKIStatus.cs │ │ │ │ ├── PKIStatusInfo.cs │ │ │ │ ├── PbmParameter.cs │ │ │ │ ├── PollRepContent.cs │ │ │ │ ├── PollReqContent.cs │ │ │ │ ├── PopoDecKeyChallContent.cs │ │ │ │ ├── PopoDecKeyRespContent.cs │ │ │ │ ├── ProtectedPart.cs │ │ │ │ ├── RevAnnContent.cs │ │ │ │ ├── RevDetails.cs │ │ │ │ ├── RevRepContent.cs │ │ │ │ ├── RevRepContentBuilder.cs │ │ │ │ └── RevReqContent.cs │ │ │ ├── cms │ │ │ │ ├── Attribute.cs │ │ │ │ ├── AttributeTable.cs │ │ │ │ ├── Attributes.cs │ │ │ │ ├── AuthEnvelopedData.cs │ │ │ │ ├── AuthEnvelopedDataParser.cs │ │ │ │ ├── AuthenticatedData.cs │ │ │ │ ├── AuthenticatedDataParser.cs │ │ │ │ ├── CMSAttributes.cs │ │ │ │ ├── CMSObjectIdentifiers.cs │ │ │ │ ├── CompressedData.cs │ │ │ │ ├── CompressedDataParser.cs │ │ │ │ ├── ContentInfo.cs │ │ │ │ ├── ContentInfoParser.cs │ │ │ │ ├── EncryptedContentInfo.cs │ │ │ │ ├── EncryptedContentInfoParser.cs │ │ │ │ ├── EncryptedData.cs │ │ │ │ ├── EnvelopedData.cs │ │ │ │ ├── EnvelopedDataParser.cs │ │ │ │ ├── Evidence.cs │ │ │ │ ├── IssuerAndSerialNumber.cs │ │ │ │ ├── KEKIdentifier.cs │ │ │ │ ├── KEKRecipientInfo.cs │ │ │ │ ├── KeyAgreeRecipientIdentifier.cs │ │ │ │ ├── KeyAgreeRecipientInfo.cs │ │ │ │ ├── KeyTransRecipientInfo.cs │ │ │ │ ├── MetaData.cs │ │ │ │ ├── OriginatorIdentifierOrKey.cs │ │ │ │ ├── OriginatorInfo.cs │ │ │ │ ├── OriginatorPublicKey.cs │ │ │ │ ├── OtherKeyAttribute.cs │ │ │ │ ├── OtherRecipientInfo.cs │ │ │ │ ├── PasswordRecipientInfo.cs │ │ │ │ ├── RecipientEncryptedKey.cs │ │ │ │ ├── RecipientIdentifier.cs │ │ │ │ ├── RecipientInfo.cs │ │ │ │ ├── RecipientKeyIdentifier.cs │ │ │ │ ├── SignedData.cs │ │ │ │ ├── SignedDataParser.cs │ │ │ │ ├── SignerIdentifier.cs │ │ │ │ ├── SignerInfo.cs │ │ │ │ ├── Time.cs │ │ │ │ ├── TimeStampAndCRL.cs │ │ │ │ ├── TimeStampTokenEvidence.cs │ │ │ │ ├── TimeStampedData.cs │ │ │ │ ├── TimeStampedDataParser.cs │ │ │ │ └── ecc │ │ │ │ │ └── MQVuserKeyingMaterial.cs │ │ │ ├── crmf │ │ │ │ ├── AttributeTypeAndValue.cs │ │ │ │ ├── CertId.cs │ │ │ │ ├── CertReqMessages.cs │ │ │ │ ├── CertReqMsg.cs │ │ │ │ ├── CertRequest.cs │ │ │ │ ├── CertTemplate.cs │ │ │ │ ├── CertTemplateBuilder.cs │ │ │ │ ├── Controls.cs │ │ │ │ ├── CrmfObjectIdentifiers.cs │ │ │ │ ├── EncKeyWithID.cs │ │ │ │ ├── EncryptedKey.cs │ │ │ │ ├── EncryptedValue.cs │ │ │ │ ├── OptionalValidity.cs │ │ │ │ ├── PKIArchiveOptions.cs │ │ │ │ ├── PKIPublicationInfo.cs │ │ │ │ ├── PKMacValue.cs │ │ │ │ ├── PopoPrivKey.cs │ │ │ │ ├── PopoSigningKey.cs │ │ │ │ ├── PopoSigningKeyInput.cs │ │ │ │ ├── ProofOfPossession.cs │ │ │ │ ├── SinglePubInfo.cs │ │ │ │ └── SubsequentMessage.cs │ │ │ ├── cryptopro │ │ │ │ ├── CryptoProObjectIdentifiers.cs │ │ │ │ ├── ECGOST3410NamedCurves.cs │ │ │ │ ├── ECGOST3410ParamSetParameters.cs │ │ │ │ ├── GOST28147Parameters.cs │ │ │ │ ├── GOST3410NamedParameters.cs │ │ │ │ ├── GOST3410ParamSetParameters.cs │ │ │ │ └── GOST3410PublicKeyAlgParameters.cs │ │ │ ├── eac │ │ │ │ └── EACObjectIdentifiers.cs │ │ │ ├── esf │ │ │ │ ├── CertificateValues.cs │ │ │ │ ├── CommitmentTypeIdentifier.cs │ │ │ │ ├── CommitmentTypeIndication.cs │ │ │ │ ├── CommitmentTypeQualifier.cs │ │ │ │ ├── CompleteCertificateRefs.cs │ │ │ │ ├── CompleteRevocationRefs.cs │ │ │ │ ├── CrlIdentifier.cs │ │ │ │ ├── CrlListID.cs │ │ │ │ ├── CrlOcspRef.cs │ │ │ │ ├── CrlValidatedID.cs │ │ │ │ ├── ESFAttributes.cs │ │ │ │ ├── OcspIdentifier.cs │ │ │ │ ├── OcspListID.cs │ │ │ │ ├── OcspResponsesID.cs │ │ │ │ ├── OtherCertID.cs │ │ │ │ ├── OtherHash.cs │ │ │ │ ├── OtherHashAlgAndValue.cs │ │ │ │ ├── OtherRevRefs.cs │ │ │ │ ├── OtherRevVals.cs │ │ │ │ ├── OtherSigningCertificate.cs │ │ │ │ ├── RevocationValues.cs │ │ │ │ ├── SigPolicyQualifierInfo.cs │ │ │ │ ├── SignaturePolicyId.cs │ │ │ │ ├── SignaturePolicyIdentifier.cs │ │ │ │ ├── SignerAttribute.cs │ │ │ │ └── SignerLocation.cs │ │ │ ├── ess │ │ │ │ ├── ContentHints.cs │ │ │ │ ├── ContentIdentifier.cs │ │ │ │ ├── ESSCertID.cs │ │ │ │ ├── ESSCertIDv2.cs │ │ │ │ ├── OtherCertID.cs │ │ │ │ ├── OtherSigningCertificate.cs │ │ │ │ ├── SigningCertificate.cs │ │ │ │ └── SigningCertificateV2.cs │ │ │ ├── gnu │ │ │ │ └── GNUObjectIdentifiers.cs │ │ │ ├── iana │ │ │ │ └── IANAObjectIdentifiers.cs │ │ │ ├── icao │ │ │ │ ├── CscaMasterList.cs │ │ │ │ ├── DataGroupHash.cs │ │ │ │ ├── ICAOObjectIdentifiers.cs │ │ │ │ ├── LDSSecurityObject.cs │ │ │ │ └── LDSVersionInfo.cs │ │ │ ├── isismtt │ │ │ │ ├── ISISMTTObjectIdentifiers.cs │ │ │ │ ├── ocsp │ │ │ │ │ ├── CertHash.cs │ │ │ │ │ └── RequestedCertificate.cs │ │ │ │ └── x509 │ │ │ │ │ ├── AdditionalInformationSyntax.cs │ │ │ │ │ ├── AdmissionSyntax.cs │ │ │ │ │ ├── Admissions.cs │ │ │ │ │ ├── DeclarationOfMajority.cs │ │ │ │ │ ├── MonetaryLimit.cs │ │ │ │ │ ├── NamingAuthority.cs │ │ │ │ │ ├── ProcurationSyntax.cs │ │ │ │ │ ├── ProfessionInfo.cs │ │ │ │ │ └── Restriction.cs │ │ │ ├── kisa │ │ │ │ └── KISAObjectIdentifiers.cs │ │ │ ├── microsoft │ │ │ │ └── MicrosoftObjectIdentifiers.cs │ │ │ ├── misc │ │ │ │ ├── CAST5CBCParameters.cs │ │ │ │ ├── IDEACBCPar.cs │ │ │ │ ├── MiscObjectIdentifiers.cs │ │ │ │ ├── NetscapeCertType.cs │ │ │ │ ├── NetscapeRevocationURL.cs │ │ │ │ └── VerisignCzagExtension.cs │ │ │ ├── mozilla │ │ │ │ └── PublicKeyAndChallenge.cs │ │ │ ├── nist │ │ │ │ ├── NISTNamedCurves.cs │ │ │ │ └── NISTObjectIdentifiers.cs │ │ │ ├── ntt │ │ │ │ └── NTTObjectIdentifiers.cs │ │ │ ├── ocsp │ │ │ │ ├── BasicOCSPResponse.cs │ │ │ │ ├── CertID.cs │ │ │ │ ├── CertStatus.cs │ │ │ │ ├── CrlID.cs │ │ │ │ ├── OCSPObjectIdentifiers.cs │ │ │ │ ├── OCSPRequest.cs │ │ │ │ ├── OCSPResponse.cs │ │ │ │ ├── OCSPResponseStatus.cs │ │ │ │ ├── Request.cs │ │ │ │ ├── ResponderID.cs │ │ │ │ ├── ResponseBytes.cs │ │ │ │ ├── ResponseData.cs │ │ │ │ ├── RevokedInfo.cs │ │ │ │ ├── ServiceLocator.cs │ │ │ │ ├── Signature.cs │ │ │ │ ├── SingleResponse.cs │ │ │ │ └── TBSRequest.cs │ │ │ ├── oiw │ │ │ │ ├── ElGamalParameter.cs │ │ │ │ └── OIWObjectIdentifiers.cs │ │ │ ├── pkcs │ │ │ │ ├── Attribute.cs │ │ │ │ ├── AuthenticatedSafe.cs │ │ │ │ ├── CertBag.cs │ │ │ │ ├── CertificationRequest.cs │ │ │ │ ├── CertificationRequestInfo.cs │ │ │ │ ├── ContentInfo.cs │ │ │ │ ├── DHParameter.cs │ │ │ │ ├── EncryptedData.cs │ │ │ │ ├── EncryptedPrivateKeyInfo.cs │ │ │ │ ├── EncryptionScheme.cs │ │ │ │ ├── IssuerAndSerialNumber.cs │ │ │ │ ├── KeyDerivationFunc.cs │ │ │ │ ├── MacData.cs │ │ │ │ ├── PBEParameter.cs │ │ │ │ ├── PBES2Parameters.cs │ │ │ │ ├── PBKDF2Params.cs │ │ │ │ ├── PKCS12PBEParams.cs │ │ │ │ ├── PKCSObjectIdentifiers.cs │ │ │ │ ├── Pfx.cs │ │ │ │ ├── PrivateKeyInfo.cs │ │ │ │ ├── RC2CBCParameter.cs │ │ │ │ ├── RSAESOAEPparams.cs │ │ │ │ ├── RSAPrivateKeyStructure.cs │ │ │ │ ├── RSASSAPSSparams.cs │ │ │ │ ├── SafeBag.cs │ │ │ │ ├── SignedData.cs │ │ │ │ └── SignerInfo.cs │ │ │ ├── sec │ │ │ │ ├── ECPrivateKeyStructure.cs │ │ │ │ ├── SECNamedCurves.cs │ │ │ │ └── SECObjectIdentifiers.cs │ │ │ ├── smime │ │ │ │ ├── SMIMEAttributes.cs │ │ │ │ ├── SMIMECapabilities.cs │ │ │ │ ├── SMIMECapabilitiesAttribute.cs │ │ │ │ ├── SMIMECapability.cs │ │ │ │ ├── SMIMECapabilityVector.cs │ │ │ │ └── SMIMEEncryptionKeyPreferenceAttribute.cs │ │ │ ├── teletrust │ │ │ │ ├── TeleTrusTNamedCurves.cs │ │ │ │ └── TeleTrusTObjectIdentifiers.cs │ │ │ ├── tsp │ │ │ │ ├── Accuracy.cs │ │ │ │ ├── MessageImprint.cs │ │ │ │ ├── TSTInfo.cs │ │ │ │ ├── TimeStampReq.cs │ │ │ │ └── TimeStampResp.cs │ │ │ ├── util │ │ │ │ ├── Asn1Dump.cs │ │ │ │ ├── Dump.cs │ │ │ │ └── FilterStream.cs │ │ │ ├── x500 │ │ │ │ └── DirectoryString.cs │ │ │ ├── x509 │ │ │ │ ├── AccessDescription.cs │ │ │ │ ├── AlgorithmIdentifier.cs │ │ │ │ ├── AttCertIssuer.cs │ │ │ │ ├── AttCertValidityPeriod.cs │ │ │ │ ├── Attribute.cs │ │ │ │ ├── AttributeCertificate.cs │ │ │ │ ├── AttributeCertificateInfo.cs │ │ │ │ ├── AttributeTable.cs │ │ │ │ ├── AuthorityInformationAccess.cs │ │ │ │ ├── AuthorityKeyIdentifier.cs │ │ │ │ ├── BasicConstraints.cs │ │ │ │ ├── CRLDistPoint.cs │ │ │ │ ├── CRLNumber.cs │ │ │ │ ├── CRLReason.cs │ │ │ │ ├── CertPolicyId.cs │ │ │ │ ├── CertificateList.cs │ │ │ │ ├── CertificatePair.cs │ │ │ │ ├── DSAParameter.cs │ │ │ │ ├── DigestInfo.cs │ │ │ │ ├── DisplayText.cs │ │ │ │ ├── DistributionPoint.cs │ │ │ │ ├── DistributionPointName.cs │ │ │ │ ├── ExtendedKeyUsage.cs │ │ │ │ ├── GeneralName.cs │ │ │ │ ├── GeneralNames.cs │ │ │ │ ├── GeneralSubtree.cs │ │ │ │ ├── Holder.cs │ │ │ │ ├── IetfAttrSyntax.cs │ │ │ │ ├── IssuerSerial.cs │ │ │ │ ├── IssuingDistributionPoint.cs │ │ │ │ ├── KeyPurposeId.cs │ │ │ │ ├── KeyUsage.cs │ │ │ │ ├── NameConstraints.cs │ │ │ │ ├── NoticeReference.cs │ │ │ │ ├── ObjectDigestInfo.cs │ │ │ │ ├── PolicyInformation.cs │ │ │ │ ├── PolicyMappings.cs │ │ │ │ ├── PolicyQualifierId.cs │ │ │ │ ├── PolicyQualifierInfo.cs │ │ │ │ ├── PrivateKeyUsagePeriod.cs │ │ │ │ ├── RSAPublicKeyStructure.cs │ │ │ │ ├── ReasonFlags.cs │ │ │ │ ├── RoleSyntax.cs │ │ │ │ ├── SubjectDirectoryAttributes.cs │ │ │ │ ├── SubjectKeyIdentifier.cs │ │ │ │ ├── SubjectPublicKeyInfo.cs │ │ │ │ ├── TBSCertList.cs │ │ │ │ ├── TBSCertificateStructure.cs │ │ │ │ ├── Target.cs │ │ │ │ ├── TargetInformation.cs │ │ │ │ ├── Targets.cs │ │ │ │ ├── Time.cs │ │ │ │ ├── UserNotice.cs │ │ │ │ ├── V1TBSCertificateGenerator.cs │ │ │ │ ├── V2AttributeCertificateInfoGenerator.cs │ │ │ │ ├── V2Form.cs │ │ │ │ ├── V2TBSCertListGenerator.cs │ │ │ │ ├── V3TBSCertificateGenerator.cs │ │ │ │ ├── X509Attributes.cs │ │ │ │ ├── X509CertificateStructure.cs │ │ │ │ ├── X509DefaultEntryConverter.cs │ │ │ │ ├── X509Extension.cs │ │ │ │ ├── X509Extensions.cs │ │ │ │ ├── X509ExtensionsGenerator.cs │ │ │ │ ├── X509Name.cs │ │ │ │ ├── X509NameEntryConverter.cs │ │ │ │ ├── X509NameTokenizer.cs │ │ │ │ ├── X509ObjectIdentifiers.cs │ │ │ │ ├── qualified │ │ │ │ │ ├── BiometricData.cs │ │ │ │ │ ├── ETSIQCObjectIdentifiers.cs │ │ │ │ │ ├── Iso4217CurrencyCode.cs │ │ │ │ │ ├── MonetaryValue.cs │ │ │ │ │ ├── QCStatement.cs │ │ │ │ │ ├── RFC3739QCObjectIdentifiers.cs │ │ │ │ │ ├── SemanticsInformation.cs │ │ │ │ │ └── TypeOfBiometricData.cs │ │ │ │ └── sigi │ │ │ │ │ ├── NameOrPseudonym.cs │ │ │ │ │ ├── PersonalData.cs │ │ │ │ │ └── SigIObjectIdentifiers.cs │ │ │ └── x9 │ │ │ │ ├── DHDomainParameters.cs │ │ │ │ ├── DHPublicKey.cs │ │ │ │ ├── DHValidationParms.cs │ │ │ │ ├── KeySpecificInfo.cs │ │ │ │ ├── OtherInfo.cs │ │ │ │ ├── X962NamedCurves.cs │ │ │ │ ├── X962Parameters.cs │ │ │ │ ├── X9Curve.cs │ │ │ │ ├── X9ECParameters.cs │ │ │ │ ├── X9ECParametersHolder.cs │ │ │ │ ├── X9ECPoint.cs │ │ │ │ ├── X9FieldElement.cs │ │ │ │ ├── X9FieldID.cs │ │ │ │ ├── X9IntegerConverter.cs │ │ │ │ └── X9ObjectIdentifiers.cs │ │ ├── bcpg │ │ │ ├── ArmoredInputStream.cs │ │ │ ├── ArmoredOutputStream.cs │ │ │ ├── BcpgInputStream.cs │ │ │ ├── BcpgObject.cs │ │ │ ├── BcpgOutputStream.cs │ │ │ ├── CompressedDataPacket.cs │ │ │ ├── CompressionAlgorithmTags.cs │ │ │ ├── ContainedPacket.cs │ │ │ ├── Crc24.cs │ │ │ ├── DsaPublicBcpgKey.cs │ │ │ ├── DsaSecretBcpgKey.cs │ │ │ ├── ElGamalPublicBcpgKey.cs │ │ │ ├── ElGamalSecretBcpgKey.cs │ │ │ ├── ExperimentalPacket.cs │ │ │ ├── HashAlgorithmTags.cs │ │ │ ├── IBcpgKey.cs │ │ │ ├── InputStreamPacket.cs │ │ │ ├── LiteralDataPacket.cs │ │ │ ├── MPInteger.cs │ │ │ ├── MarkerPacket.cs │ │ │ ├── ModDetectionCodePacket.cs │ │ │ ├── OnePassSignaturePacket.cs │ │ │ ├── OutputStreamPacket.cs │ │ │ ├── Packet.cs │ │ │ ├── PacketTags.cs │ │ │ ├── PublicKeyAlgorithmTags.cs │ │ │ ├── PublicKeyEncSessionPacket.cs │ │ │ ├── PublicKeyPacket.cs │ │ │ ├── PublicSubkeyPacket.cs │ │ │ ├── RsaPublicBcpgKey.cs │ │ │ ├── RsaSecretBcpgKey.cs │ │ │ ├── S2k.cs │ │ │ ├── SecretKeyPacket.cs │ │ │ ├── SecretSubkeyPacket.cs │ │ │ ├── SignaturePacket.cs │ │ │ ├── SignatureSubpacket.cs │ │ │ ├── SignatureSubpacketTags.cs │ │ │ ├── SignatureSubpacketsReader.cs │ │ │ ├── SymmetricEncDataPacket.cs │ │ │ ├── SymmetricEncIntegrityPacket.cs │ │ │ ├── SymmetricKeyAlgorithmTags.cs │ │ │ ├── SymmetricKeyEncSessionPacket.cs │ │ │ ├── TrustPacket.cs │ │ │ ├── UserAttributePacket.cs │ │ │ ├── UserAttributeSubpacket.cs │ │ │ ├── UserAttributeSubpacketTags.cs │ │ │ ├── UserAttributeSubpacketsReader.cs │ │ │ ├── UserIdPacket.cs │ │ │ ├── attr │ │ │ │ └── ImageAttrib.cs │ │ │ └── sig │ │ │ │ ├── EmbeddedSignature.cs │ │ │ │ ├── Exportable.cs │ │ │ │ ├── IssuerKeyId.cs │ │ │ │ ├── KeyExpirationTime.cs │ │ │ │ ├── KeyFlags.cs │ │ │ │ ├── NotationData.cs │ │ │ │ ├── PreferredAlgorithms.cs │ │ │ │ ├── PrimaryUserId.cs │ │ │ │ ├── Revocable.cs │ │ │ │ ├── SignatureCreationTime.cs │ │ │ │ ├── SignatureExpirationTime.cs │ │ │ │ ├── SignerUserId.cs │ │ │ │ └── TrustSignature.cs │ │ ├── cms │ │ │ ├── BaseDigestCalculator.cs │ │ │ ├── CMSAttributeTableGenerationException.cs │ │ │ ├── CMSAttributeTableGenerator.cs │ │ │ ├── CMSAuthEnvelopedData.cs │ │ │ ├── CMSAuthEnvelopedGenerator.cs │ │ │ ├── CMSAuthenticatedData.cs │ │ │ ├── CMSAuthenticatedDataGenerator.cs │ │ │ ├── CMSAuthenticatedDataParser.cs │ │ │ ├── CMSAuthenticatedDataStreamGenerator.cs │ │ │ ├── CMSAuthenticatedGenerator.cs │ │ │ ├── CMSCompressedData.cs │ │ │ ├── CMSCompressedDataGenerator.cs │ │ │ ├── CMSCompressedDataParser.cs │ │ │ ├── CMSCompressedDataStreamGenerator.cs │ │ │ ├── CMSContentInfoParser.cs │ │ │ ├── CMSEnvelopedData.cs │ │ │ ├── CMSEnvelopedDataGenerator.cs │ │ │ ├── CMSEnvelopedDataParser.cs │ │ │ ├── CMSEnvelopedDataStreamGenerator.cs │ │ │ ├── CMSEnvelopedGenerator.cs │ │ │ ├── CMSEnvelopedHelper.cs │ │ │ ├── CMSException.cs │ │ │ ├── CMSPBEKey.cs │ │ │ ├── CMSProcessable.cs │ │ │ ├── CMSProcessableByteArray.cs │ │ │ ├── CMSProcessableFile.cs │ │ │ ├── CMSProcessableInputStream.cs │ │ │ ├── CMSReadable.cs │ │ │ ├── CMSSecureReadable.cs │ │ │ ├── CMSSignedData.cs │ │ │ ├── CMSSignedDataGenerator.cs │ │ │ ├── CMSSignedDataParser.cs │ │ │ ├── CMSSignedDataStreamGenerator.cs │ │ │ ├── CMSSignedGenerator.cs │ │ │ ├── CMSSignedHelper.cs │ │ │ ├── CMSStreamException.cs │ │ │ ├── CMSTypedStream.cs │ │ │ ├── CMSUtils.cs │ │ │ ├── CounterSignatureDigestCalculator.cs │ │ │ ├── DefaultAuthenticatedAttributeTableGenerator.cs │ │ │ ├── DefaultSignedAttributeTableGenerator.cs │ │ │ ├── DigOutputStream.cs │ │ │ ├── IDigestCalculator.cs │ │ │ ├── KEKRecipientInfoGenerator.cs │ │ │ ├── KEKRecipientInformation.cs │ │ │ ├── KeyAgreeRecipientInfoGenerator.cs │ │ │ ├── KeyAgreeRecipientInformation.cs │ │ │ ├── KeyTransRecipientInfoGenerator.cs │ │ │ ├── KeyTransRecipientInformation.cs │ │ │ ├── MacOutputStream.cs │ │ │ ├── NullOutputStream.cs │ │ │ ├── OriginatorId.cs │ │ │ ├── PKCS5Scheme2PBEKey.cs │ │ │ ├── PKCS5Scheme2UTF8PBEKey.cs │ │ │ ├── PasswordRecipientInfoGenerator.cs │ │ │ ├── PasswordRecipientInformation.cs │ │ │ ├── RecipientId.cs │ │ │ ├── RecipientInfoGenerator.cs │ │ │ ├── RecipientInformation.cs │ │ │ ├── RecipientInformationStore.cs │ │ │ ├── SigOutputStream.cs │ │ │ ├── SignerId.cs │ │ │ ├── SignerInfoGenerator.cs │ │ │ ├── SignerInformation.cs │ │ │ ├── SignerInformationStore.cs │ │ │ └── SimpleAttributeTableGenerator.cs │ │ ├── crypto │ │ │ ├── AsymmetricCipherKeyPair.cs │ │ │ ├── AsymmetricKeyParameter.cs │ │ │ ├── BufferedAeadBlockCipher.cs │ │ │ ├── BufferedAsymmetricBlockCipher.cs │ │ │ ├── BufferedBlockCipher.cs │ │ │ ├── BufferedCipherBase.cs │ │ │ ├── BufferedIesCipher.cs │ │ │ ├── BufferedStreamCipher.cs │ │ │ ├── CipherKeyGenerator.cs │ │ │ ├── CryptoException.cs │ │ │ ├── DataLengthException.cs │ │ │ ├── IAsymmetricBlockCipher.cs │ │ │ ├── IAsymmetricCipherKeyPairGenerator.cs │ │ │ ├── IBasicAgreement.cs │ │ │ ├── IBlockCipher.cs │ │ │ ├── IBufferedCipher.cs │ │ │ ├── ICipherParameters.cs │ │ │ ├── IDSA.cs │ │ │ ├── IDerivationFunction.cs │ │ │ ├── IDerivationParameters.cs │ │ │ ├── IDigest.cs │ │ │ ├── IMac.cs │ │ │ ├── ISigner.cs │ │ │ ├── ISignerWithRecovery.cs │ │ │ ├── IStreamCipher.cs │ │ │ ├── IWrapper.cs │ │ │ ├── InvalidCipherTextException.cs │ │ │ ├── KeyGenerationParameters.cs │ │ │ ├── MaxBytesExceededException.cs │ │ │ ├── PbeParametersGenerator.cs │ │ │ ├── StreamBlockCipher.cs │ │ │ ├── agreement │ │ │ │ ├── DHAgreement.cs │ │ │ │ ├── DHBasicAgreement.cs │ │ │ │ ├── ECDHBasicAgreement.cs │ │ │ │ ├── ECDHCBasicAgreement.cs │ │ │ │ ├── ECDHWithKdfBasicAgreement.cs │ │ │ │ ├── ECMqvBasicAgreement.cs │ │ │ │ ├── ECMqvWithKdfBasicAgreement.cs │ │ │ │ ├── kdf │ │ │ │ │ ├── DHKdfParameters.cs │ │ │ │ │ ├── DHKekGenerator.cs │ │ │ │ │ └── ECDHKekGenerator.cs │ │ │ │ └── srp │ │ │ │ │ ├── SRP6Client.cs │ │ │ │ │ ├── SRP6Server.cs │ │ │ │ │ ├── SRP6Utilities.cs │ │ │ │ │ └── SRP6VerifierGenerator.cs │ │ │ ├── digests │ │ │ │ ├── GOST3411Digest.cs │ │ │ │ ├── GeneralDigest.cs │ │ │ │ ├── LongDigest.cs │ │ │ │ ├── MD2Digest.cs │ │ │ │ ├── MD4Digest.cs │ │ │ │ ├── MD5Digest.cs │ │ │ │ ├── NullDigest.cs │ │ │ │ ├── RipeMD128Digest.cs │ │ │ │ ├── RipeMD160Digest.cs │ │ │ │ ├── RipeMD256Digest.cs │ │ │ │ ├── RipeMD320Digest.cs │ │ │ │ ├── Sha1Digest.cs │ │ │ │ ├── Sha224Digest.cs │ │ │ │ ├── Sha256Digest.cs │ │ │ │ ├── Sha384Digest.cs │ │ │ │ ├── Sha512Digest.cs │ │ │ │ ├── ShortenedDigest.cs │ │ │ │ ├── TigerDigest.cs │ │ │ │ └── WhirlpoolDigest.cs │ │ │ ├── encodings │ │ │ │ ├── ISO9796d1Encoding.cs │ │ │ │ ├── OaepEncoding.cs │ │ │ │ └── Pkcs1Encoding.cs │ │ │ ├── engines │ │ │ │ ├── AesEngine.cs │ │ │ │ ├── AesFastEngine.cs │ │ │ │ ├── AesLightEngine.cs │ │ │ │ ├── AesWrapEngine.cs │ │ │ │ ├── BlowfishEngine.cs │ │ │ │ ├── CamelliaEngine.cs │ │ │ │ ├── CamelliaLightEngine.cs │ │ │ │ ├── CamelliaWrapEngine.cs │ │ │ │ ├── Cast5Engine.cs │ │ │ │ ├── Cast6Engine.cs │ │ │ │ ├── DesEdeEngine.cs │ │ │ │ ├── DesEdeWrapEngine.cs │ │ │ │ ├── DesEngine.cs │ │ │ │ ├── ElGamalEngine.cs │ │ │ │ ├── GOST28147Engine.cs │ │ │ │ ├── HC128Engine.cs │ │ │ │ ├── HC256Engine.cs │ │ │ │ ├── ISAACEngine.cs │ │ │ │ ├── IdeaEngine.cs │ │ │ │ ├── IesEngine.cs │ │ │ │ ├── NaccacheSternEngine.cs │ │ │ │ ├── NoekeonEngine.cs │ │ │ │ ├── NullEngine.cs │ │ │ │ ├── RC2Engine.cs │ │ │ │ ├── RC2WrapEngine.cs │ │ │ │ ├── RC4Engine.cs │ │ │ │ ├── RC532Engine.cs │ │ │ │ ├── RC564Engine.cs │ │ │ │ ├── RC6Engine.cs │ │ │ │ ├── RFC3211WrapEngine.cs │ │ │ │ ├── RFC3394WrapEngine.cs │ │ │ │ ├── RSABlindedEngine.cs │ │ │ │ ├── RSABlindingEngine.cs │ │ │ │ ├── RSACoreEngine.cs │ │ │ │ ├── RijndaelEngine.cs │ │ │ │ ├── RsaEngine.cs │ │ │ │ ├── SEEDEngine.cs │ │ │ │ ├── SEEDWrapEngine.cs │ │ │ │ ├── Salsa20Engine.cs │ │ │ │ ├── SerpentEngine.cs │ │ │ │ ├── SkipjackEngine.cs │ │ │ │ ├── TEAEngine.cs │ │ │ │ ├── TwofishEngine.cs │ │ │ │ ├── VMPCEngine.cs │ │ │ │ ├── VMPCKSA3Engine.cs │ │ │ │ └── XTEAEngine.cs │ │ │ ├── generators │ │ │ │ ├── BaseKdfBytesGenerator.cs │ │ │ │ ├── DHBasicKeyPairGenerator.cs │ │ │ │ ├── DHKeyGeneratorHelper.cs │ │ │ │ ├── DHKeyPairGenerator.cs │ │ │ │ ├── DHParametersGenerator.cs │ │ │ │ ├── DHParametersHelper.cs │ │ │ │ ├── DesEdeKeyGenerator.cs │ │ │ │ ├── DesKeyGenerator.cs │ │ │ │ ├── DsaKeyPairGenerator.cs │ │ │ │ ├── DsaParametersGenerator.cs │ │ │ │ ├── ECKeyPairGenerator.cs │ │ │ │ ├── ElGamalKeyPairGenerator.cs │ │ │ │ ├── ElGamalParametersGenerator.cs │ │ │ │ ├── GOST3410KeyPairGenerator.cs │ │ │ │ ├── GOST3410ParametersGenerator.cs │ │ │ │ ├── Kdf1BytesGenerator.cs │ │ │ │ ├── Kdf2BytesGenerator.cs │ │ │ │ ├── Mgf1BytesGenerator.cs │ │ │ │ ├── NaccacheSternKeyPairGenerator.cs │ │ │ │ ├── OpenSSLPBEParametersGenerator.cs │ │ │ │ ├── Pkcs12ParametersGenerator.cs │ │ │ │ ├── Pkcs5S1ParametersGenerator.cs │ │ │ │ ├── Pkcs5S2ParametersGenerator.cs │ │ │ │ ├── RSABlindingFactorGenerator.cs │ │ │ │ └── RsaKeyPairGenerator.cs │ │ │ ├── io │ │ │ │ ├── CipherStream.cs │ │ │ │ ├── DigestStream.cs │ │ │ │ ├── MacStream.cs │ │ │ │ └── SignerStream.cs │ │ │ ├── macs │ │ │ │ ├── CMac.cs │ │ │ │ ├── CbcBlockCipherMac.cs │ │ │ │ ├── CfbBlockCipherMac.cs │ │ │ │ ├── GOST28147Mac.cs │ │ │ │ ├── HMac.cs │ │ │ │ ├── ISO9797Alg3Mac.cs │ │ │ │ └── VMPCMac.cs │ │ │ ├── modes │ │ │ │ ├── CbcBlockCipher.cs │ │ │ │ ├── CcmBlockCipher.cs │ │ │ │ ├── CfbBlockCipher.cs │ │ │ │ ├── CtsBlockCipher.cs │ │ │ │ ├── EAXBlockCipher.cs │ │ │ │ ├── GCMBlockCipher.cs │ │ │ │ ├── GOFBBlockCipher.cs │ │ │ │ ├── IAeadBlockCipher.cs │ │ │ │ ├── OfbBlockCipher.cs │ │ │ │ ├── OpenPgpCfbBlockCipher.cs │ │ │ │ ├── SicBlockCipher.cs │ │ │ │ └── gcm │ │ │ │ │ ├── BasicGcmExponentiator.cs │ │ │ │ │ ├── BasicGcmMultiplier.cs │ │ │ │ │ ├── GcmUtilities.cs │ │ │ │ │ ├── IGcmExponentiator.cs │ │ │ │ │ ├── IGcmMultiplier.cs │ │ │ │ │ ├── Tables1kGcmExponentiator.cs │ │ │ │ │ ├── Tables64kGcmMultiplier.cs │ │ │ │ │ └── Tables8kGcmMultiplier.cs │ │ │ ├── paddings │ │ │ │ ├── BlockCipherPadding.cs │ │ │ │ ├── ISO10126d2Padding.cs │ │ │ │ ├── ISO7816d4Padding.cs │ │ │ │ ├── PaddedBufferedBlockCipher.cs │ │ │ │ ├── Pkcs7Padding.cs │ │ │ │ ├── TbcPadding.cs │ │ │ │ ├── X923Padding.cs │ │ │ │ └── ZeroBytePadding.cs │ │ │ ├── parameters │ │ │ │ ├── AEADParameters.cs │ │ │ │ ├── CcmParameters.cs │ │ │ │ ├── DHKeyGenerationParameters.cs │ │ │ │ ├── DHKeyParameters.cs │ │ │ │ ├── DHParameters.cs │ │ │ │ ├── DHPrivateKeyParameters.cs │ │ │ │ ├── DHPublicKeyParameters.cs │ │ │ │ ├── DHValidationParameters.cs │ │ │ │ ├── DesEdeParameters.cs │ │ │ │ ├── DesParameters.cs │ │ │ │ ├── DsaKeyGenerationParameters.cs │ │ │ │ ├── DsaKeyParameters.cs │ │ │ │ ├── DsaParameters.cs │ │ │ │ ├── DsaPrivateKeyParameters.cs │ │ │ │ ├── DsaPublicKeyParameters.cs │ │ │ │ ├── DsaValidationParameters.cs │ │ │ │ ├── ECDomainParameters.cs │ │ │ │ ├── ECKeyGenerationParameters.cs │ │ │ │ ├── ECKeyParameters.cs │ │ │ │ ├── ECPrivateKeyParameters.cs │ │ │ │ ├── ECPublicKeyParameters.cs │ │ │ │ ├── ElGamalKeyGenerationParameters.cs │ │ │ │ ├── ElGamalKeyParameters.cs │ │ │ │ ├── ElGamalParameters.cs │ │ │ │ ├── ElGamalPrivateKeyParameters.cs │ │ │ │ ├── ElGamalPublicKeyParameters.cs │ │ │ │ ├── GOST3410KeyGenerationParameters.cs │ │ │ │ ├── GOST3410KeyParameters.cs │ │ │ │ ├── GOST3410Parameters.cs │ │ │ │ ├── GOST3410PrivateKeyParameters.cs │ │ │ │ ├── GOST3410PublicKeyParameters.cs │ │ │ │ ├── GOST3410ValidationParameters.cs │ │ │ │ ├── ISO18033KDFParameters.cs │ │ │ │ ├── IesParameters.cs │ │ │ │ ├── IesWithCipherParameters.cs │ │ │ │ ├── KdfParameters.cs │ │ │ │ ├── KeyParameter.cs │ │ │ │ ├── MgfParameters.cs │ │ │ │ ├── MqvPrivateParameters.cs │ │ │ │ ├── MqvPublicParameters.cs │ │ │ │ ├── NaccacheSternKeyGenerationParameters.cs │ │ │ │ ├── NaccacheSternKeyParameters.cs │ │ │ │ ├── NaccacheSternPrivateKeyParameters.cs │ │ │ │ ├── ParametersWithIV.cs │ │ │ │ ├── ParametersWithRandom.cs │ │ │ │ ├── ParametersWithSBox.cs │ │ │ │ ├── ParametersWithSalt.cs │ │ │ │ ├── RC2Parameters.cs │ │ │ │ ├── RC5Parameters.cs │ │ │ │ ├── RSABlindingParameters.cs │ │ │ │ ├── RsaKeyGenerationParameters.cs │ │ │ │ ├── RsaKeyParameters.cs │ │ │ │ └── RsaPrivateCrtKeyParameters.cs │ │ │ ├── prng │ │ │ │ ├── CryptoApiRandomGenerator.cs │ │ │ │ ├── DigestRandomGenerator.cs │ │ │ │ ├── IRandomGenerator.cs │ │ │ │ ├── ReversedWindowGenerator.cs │ │ │ │ ├── ThreadedSeedGenerator.cs │ │ │ │ └── VMPCRandomGenerator.cs │ │ │ ├── signers │ │ │ │ ├── DsaDigestSigner.cs │ │ │ │ ├── DsaSigner.cs │ │ │ │ ├── ECDsaSigner.cs │ │ │ │ ├── ECGOST3410Signer.cs │ │ │ │ ├── ECNRSigner.cs │ │ │ │ ├── GOST3410DigestSigner.cs │ │ │ │ ├── GOST3410Signer.cs │ │ │ │ ├── GenericSigner.cs │ │ │ │ ├── Iso9796d2PssSigner.cs │ │ │ │ ├── Iso9796d2Signer.cs │ │ │ │ ├── PssSigner.cs │ │ │ │ └── RsaDigestSigner.cs │ │ │ ├── tls │ │ │ │ ├── AlertDescription.cs │ │ │ │ ├── AlertLevel.cs │ │ │ │ ├── AlwaysValidVerifyer.cs │ │ │ │ ├── ByteQueue.cs │ │ │ │ ├── Certificate.cs │ │ │ │ ├── CertificateRequest.cs │ │ │ │ ├── CipherSuite.cs │ │ │ │ ├── ClientCertificateType.cs │ │ │ │ ├── CombinedHash.cs │ │ │ │ ├── CompressionMethod.cs │ │ │ │ ├── ContentType.cs │ │ │ │ ├── DefaultTlsAgreementCredentials.cs │ │ │ │ ├── DefaultTlsCipherFactory.cs │ │ │ │ ├── DefaultTlsClient.cs │ │ │ │ ├── DefaultTlsSignerCredentials.cs │ │ │ │ ├── DigestAlgorithm.cs │ │ │ │ ├── ECCurveType.cs │ │ │ │ ├── ECPointFormat.cs │ │ │ │ ├── EncryptionAlgorithm.cs │ │ │ │ ├── ExtensionType.cs │ │ │ │ ├── HandshakeType.cs │ │ │ │ ├── ICertificateVerifyer.cs │ │ │ │ ├── KeyExchangeAlgorithm.cs │ │ │ │ ├── LegacyTlsAuthentication.cs │ │ │ │ ├── LegacyTlsClient.cs │ │ │ │ ├── NamedCurve.cs │ │ │ │ ├── RecordStream.cs │ │ │ │ ├── SecurityParameters.cs │ │ │ │ ├── SrpTlsClient.cs │ │ │ │ ├── TlsAgreementCredentials.cs │ │ │ │ ├── TlsAuthentication.cs │ │ │ │ ├── TlsBlockCipher.cs │ │ │ │ ├── TlsCipher.cs │ │ │ │ ├── TlsCipherFactory.cs │ │ │ │ ├── TlsClient.cs │ │ │ │ ├── TlsClientContext.cs │ │ │ │ ├── TlsClientContextImpl.cs │ │ │ │ ├── TlsCompression.cs │ │ │ │ ├── TlsCredentials.cs │ │ │ │ ├── TlsDHKeyExchange.cs │ │ │ │ ├── TlsDeflateCompression.cs │ │ │ │ ├── TlsDheKeyExchange.cs │ │ │ │ ├── TlsDsaSigner.cs │ │ │ │ ├── TlsDssSigner.cs │ │ │ │ ├── TlsECDHKeyExchange.cs │ │ │ │ ├── TlsECDheKeyExchange.cs │ │ │ │ ├── TlsECDsaSigner.cs │ │ │ │ ├── TlsException.cs │ │ │ │ ├── TlsFatalAlert.cs │ │ │ │ ├── TlsKeyExchange.cs │ │ │ │ ├── TlsMac.cs │ │ │ │ ├── TlsNullCipher.cs │ │ │ │ ├── TlsNullCompression.cs │ │ │ │ ├── TlsProtocolHandler.cs │ │ │ │ ├── TlsRsaKeyExchange.cs │ │ │ │ ├── TlsRsaSigner.cs │ │ │ │ ├── TlsSigner.cs │ │ │ │ ├── TlsSignerCredentials.cs │ │ │ │ ├── TlsSrpKeyExchange.cs │ │ │ │ ├── TlsStream.cs │ │ │ │ └── TlsUtilities.cs │ │ │ └── util │ │ │ │ └── Pack.cs │ │ ├── math │ │ │ ├── BigInteger.cs │ │ │ └── ec │ │ │ │ ├── ECAlgorithms.cs │ │ │ │ ├── ECCurve.cs │ │ │ │ ├── ECFieldElement.cs │ │ │ │ ├── ECPoint.cs │ │ │ │ ├── IntArray.cs │ │ │ │ ├── abc │ │ │ │ ├── SimpleBigDecimal.cs │ │ │ │ ├── Tnaf.cs │ │ │ │ └── ZTauElement.cs │ │ │ │ └── multiplier │ │ │ │ ├── ECMultiplier.cs │ │ │ │ ├── FpNafMultiplier.cs │ │ │ │ ├── PreCompInfo.cs │ │ │ │ ├── ReferenceMultiplier.cs │ │ │ │ ├── WNafMultiplier.cs │ │ │ │ ├── WNafPreCompInfo.cs │ │ │ │ ├── WTauNafMultiplier.cs │ │ │ │ └── WTauNafPreCompInfo.cs │ │ ├── ocsp │ │ │ ├── BasicOCSPResp.cs │ │ │ ├── BasicOCSPRespGenerator.cs │ │ │ ├── CertificateID.cs │ │ │ ├── CertificateStatus.cs │ │ │ ├── OCSPException.cs │ │ │ ├── OCSPReq.cs │ │ │ ├── OCSPReqGenerator.cs │ │ │ ├── OCSPResp.cs │ │ │ ├── OCSPRespGenerator.cs │ │ │ ├── OCSPRespStatus.cs │ │ │ ├── OCSPUtil.cs │ │ │ ├── Req.cs │ │ │ ├── RespData.cs │ │ │ ├── RespID.cs │ │ │ ├── RevokedStatus.cs │ │ │ ├── SingleResp.cs │ │ │ └── UnknownStatus.cs │ │ ├── openpgp │ │ │ ├── IStreamGenerator.cs │ │ │ ├── PGPKeyRing.cs │ │ │ ├── PGPObject.cs │ │ │ ├── PGPUserAttributeSubpacketVectorGenerator.cs │ │ │ ├── PgpCompressedData.cs │ │ │ ├── PgpCompressedDataGenerator.cs │ │ │ ├── PgpDataValidationException.cs │ │ │ ├── PgpEncryptedData.cs │ │ │ ├── PgpEncryptedDataGenerator.cs │ │ │ ├── PgpEncryptedDataList.cs │ │ │ ├── PgpException.cs │ │ │ ├── PgpExperimental.cs │ │ │ ├── PgpKeyFlags.cs │ │ │ ├── PgpKeyPair.cs │ │ │ ├── PgpKeyRingGenerator.cs │ │ │ ├── PgpKeyValidationException.cs │ │ │ ├── PgpLiteralData.cs │ │ │ ├── PgpLiteralDataGenerator.cs │ │ │ ├── PgpMarker.cs │ │ │ ├── PgpObjectFactory.cs │ │ │ ├── PgpOnePassSignature.cs │ │ │ ├── PgpOnePassSignatureList.cs │ │ │ ├── PgpPbeEncryptedData.cs │ │ │ ├── PgpPrivateKey.cs │ │ │ ├── PgpPublicKey.cs │ │ │ ├── PgpPublicKeyEncryptedData.cs │ │ │ ├── PgpPublicKeyRing.cs │ │ │ ├── PgpPublicKeyRingBundle.cs │ │ │ ├── PgpSecretKey.cs │ │ │ ├── PgpSecretKeyRing.cs │ │ │ ├── PgpSecretKeyRingBundle.cs │ │ │ ├── PgpSignature.cs │ │ │ ├── PgpSignatureGenerator.cs │ │ │ ├── PgpSignatureList.cs │ │ │ ├── PgpSignatureSubpacketGenerator.cs │ │ │ ├── PgpSignatureSubpacketVector.cs │ │ │ ├── PgpUserAttributeSubpacketVector.cs │ │ │ ├── PgpUtilities.cs │ │ │ ├── PgpV3SignatureGenerator.cs │ │ │ └── WrappedGeneratorStream.cs │ │ ├── openssl │ │ │ ├── EncryptionException.cs │ │ │ ├── IPasswordFinder.cs │ │ │ ├── MiscPemGenerator.cs │ │ │ ├── PEMException.cs │ │ │ ├── PEMReader.cs │ │ │ ├── PEMUtilities.cs │ │ │ ├── PEMWriter.cs │ │ │ ├── PasswordException.cs │ │ │ └── Pkcs8Generator.cs │ │ ├── pkcs │ │ │ ├── AsymmetricKeyEntry.cs │ │ │ ├── EncryptedPrivateKeyInfoFactory.cs │ │ │ ├── PKCS12StoreBuilder.cs │ │ │ ├── Pkcs10CertificationRequest.cs │ │ │ ├── Pkcs10CertificationRequestDelaySigned.cs │ │ │ ├── Pkcs12Entry.cs │ │ │ ├── Pkcs12Store.cs │ │ │ ├── Pkcs12Utilities.cs │ │ │ ├── PrivateKeyInfoFactory.cs │ │ │ └── X509CertificateEntry.cs │ │ ├── pkix │ │ │ ├── CertStatus.cs │ │ │ ├── PkixAttrCertChecker.cs │ │ │ ├── PkixAttrCertPathBuilder.cs │ │ │ ├── PkixAttrCertPathValidator.cs │ │ │ ├── PkixBuilderParameters.cs │ │ │ ├── PkixCertPath.cs │ │ │ ├── PkixCertPathBuilder.cs │ │ │ ├── PkixCertPathBuilderException.cs │ │ │ ├── PkixCertPathBuilderResult.cs │ │ │ ├── PkixCertPathChecker.cs │ │ │ ├── PkixCertPathValidator.cs │ │ │ ├── PkixCertPathValidatorException.cs │ │ │ ├── PkixCertPathValidatorResult.cs │ │ │ ├── PkixCertPathValidatorUtilities.cs │ │ │ ├── PkixCrlUtilities.cs │ │ │ ├── PkixNameConstraintValidator.cs │ │ │ ├── PkixNameConstraintValidatorException.cs │ │ │ ├── PkixParameters.cs │ │ │ ├── PkixPolicyNode.cs │ │ │ ├── ReasonsMask.cs │ │ │ ├── Rfc3280CertPathUtilities.cs │ │ │ ├── Rfc3281CertPathUtilities.cs │ │ │ └── TrustAnchor.cs │ │ ├── security │ │ │ ├── AgreementUtilities.cs │ │ │ ├── CipherUtilities.cs │ │ │ ├── DigestUtilities.cs │ │ │ ├── DotNetUtilities.cs │ │ │ ├── GeneralSecurityException.cs │ │ │ ├── GeneratorUtilities.cs │ │ │ ├── InvalidKeyException.cs │ │ │ ├── InvalidParameterException.cs │ │ │ ├── KeyException.cs │ │ │ ├── MacUtilities.cs │ │ │ ├── NoSuchAlgorithmException.cs │ │ │ ├── ParameterUtilities.cs │ │ │ ├── PbeUtilities.cs │ │ │ ├── PrivateKeyFactory.cs │ │ │ ├── PublicKeyFactory.cs │ │ │ ├── SecureRandom.cs │ │ │ ├── SecurityUtilityException.cs │ │ │ ├── SignatureException.cs │ │ │ ├── SignerUtilities.cs │ │ │ ├── WrapperUtilities.cs │ │ │ └── cert │ │ │ │ ├── CertificateEncodingException.cs │ │ │ │ ├── CertificateException.cs │ │ │ │ ├── CertificateExpiredException.cs │ │ │ │ ├── CertificateNotYetValidException.cs │ │ │ │ ├── CertificateParsingException.cs │ │ │ │ └── CrlException.cs │ │ ├── tsp │ │ │ ├── GenTimeAccuracy.cs │ │ │ ├── TSPAlgorithms.cs │ │ │ ├── TSPException.cs │ │ │ ├── TSPUtil.cs │ │ │ ├── TSPValidationException.cs │ │ │ ├── TimeStampRequest.cs │ │ │ ├── TimeStampRequestGenerator.cs │ │ │ ├── TimeStampResponse.cs │ │ │ ├── TimeStampResponseGenerator.cs │ │ │ ├── TimeStampToken.cs │ │ │ ├── TimeStampTokenGenerator.cs │ │ │ └── TimeStampTokenInfo.cs │ │ ├── util │ │ │ ├── Arrays.cs │ │ │ ├── BigIntegers.cs │ │ │ ├── Enums.cs │ │ │ ├── Platform.cs │ │ │ ├── Strings.cs │ │ │ ├── collections │ │ │ │ ├── CollectionUtilities.cs │ │ │ │ ├── EmptyEnumerable.cs │ │ │ │ ├── EnumerableProxy.cs │ │ │ │ ├── HashSet.cs │ │ │ │ ├── ISet.cs │ │ │ │ ├── LinkedDictionary.cs │ │ │ │ ├── UnmodifiableDictionary.cs │ │ │ │ ├── UnmodifiableDictionaryProxy.cs │ │ │ │ ├── UnmodifiableList.cs │ │ │ │ ├── UnmodifiableListProxy.cs │ │ │ │ ├── UnmodifiableSet.cs │ │ │ │ └── UnmodifiableSetProxy.cs │ │ │ ├── date │ │ │ │ ├── DateTimeObject.cs │ │ │ │ └── DateTimeUtilities.cs │ │ │ ├── encoders │ │ │ │ ├── Base64.cs │ │ │ │ ├── Base64Encoder.cs │ │ │ │ ├── BufferedDecoder.cs │ │ │ │ ├── BufferedEncoder.cs │ │ │ │ ├── Hex.cs │ │ │ │ ├── HexEncoder.cs │ │ │ │ ├── HexTranslator.cs │ │ │ │ ├── IEncoder.cs │ │ │ │ ├── Translator.cs │ │ │ │ ├── UrlBase64.cs │ │ │ │ └── UrlBase64Encoder.cs │ │ │ ├── io │ │ │ │ ├── BaseInputStream.cs │ │ │ │ ├── BaseOutputStream.cs │ │ │ │ ├── PushbackStream.cs │ │ │ │ ├── StreamOverflowException.cs │ │ │ │ ├── Streams.cs │ │ │ │ ├── TeeInputStream.cs │ │ │ │ ├── TeeOutputStream.cs │ │ │ │ └── pem │ │ │ │ │ ├── PemGenerationException.cs │ │ │ │ │ ├── PemHeader.cs │ │ │ │ │ ├── PemObject.cs │ │ │ │ │ ├── PemObjectGenerator.cs │ │ │ │ │ ├── PemObjectParser.cs │ │ │ │ │ ├── PemReader.cs │ │ │ │ │ └── PemWriter.cs │ │ │ ├── net │ │ │ │ └── IPAddress.cs │ │ │ └── zlib │ │ │ │ ├── Adler32.cs │ │ │ │ ├── Deflate.cs │ │ │ │ ├── InfBlocks.cs │ │ │ │ ├── InfCodes.cs │ │ │ │ ├── InfTree.cs │ │ │ │ ├── Inflate.cs │ │ │ │ ├── JZlib.cs │ │ │ │ ├── StaticTree.cs │ │ │ │ ├── Tree.cs │ │ │ │ ├── ZDeflaterOutputStream.cs │ │ │ │ ├── ZInflaterInputStream.cs │ │ │ │ ├── ZInputStream.cs │ │ │ │ ├── ZOutputStream.cs │ │ │ │ └── ZStream.cs │ │ └── x509 │ │ │ ├── AttributeCertificateHolder.cs │ │ │ ├── AttributeCertificateIssuer.cs │ │ │ ├── IX509AttributeCertificate.cs │ │ │ ├── IX509Extension.cs │ │ │ ├── PEMParser.cs │ │ │ ├── PrincipalUtil.cs │ │ │ ├── SubjectPublicKeyInfoFactory.cs │ │ │ ├── X509AttrCertParser.cs │ │ │ ├── X509Attribute.cs │ │ │ ├── X509CertPairParser.cs │ │ │ ├── X509Certificate.cs │ │ │ ├── X509CertificatePair.cs │ │ │ ├── X509CertificateParser.cs │ │ │ ├── X509Crl.cs │ │ │ ├── X509CrlEntry.cs │ │ │ ├── X509CrlParser.cs │ │ │ ├── X509ExtensionBase.cs │ │ │ ├── X509KeyUsage.cs │ │ │ ├── X509SignatureUtil.cs │ │ │ ├── X509Utilities.cs │ │ │ ├── X509V1CertificateGenerator.cs │ │ │ ├── X509V2AttributeCertificate.cs │ │ │ ├── X509V2AttributeCertificateGenerator.cs │ │ │ ├── X509V2CRLGenerator.cs │ │ │ ├── X509V3CertificateGenerator.cs │ │ │ ├── extension │ │ │ ├── AuthorityKeyIdentifierStructure.cs │ │ │ ├── SubjectKeyIdentifierStructure.cs │ │ │ └── X509ExtensionUtil.cs │ │ │ └── store │ │ │ ├── IX509Selector.cs │ │ │ ├── IX509Store.cs │ │ │ ├── IX509StoreParameters.cs │ │ │ ├── NoSuchStoreException.cs │ │ │ ├── X509AttrCertStoreSelector.cs │ │ │ ├── X509CertPairStoreSelector.cs │ │ │ ├── X509CertStoreSelector.cs │ │ │ ├── X509CollectionStore.cs │ │ │ ├── X509CollectionStoreParameters.cs │ │ │ ├── X509CrlStoreSelector.cs │ │ │ ├── X509StoreException.cs │ │ │ └── X509StoreFactory.cs │ ├── Core │ │ ├── Attributes │ │ │ ├── CmdletDescriptionAttribute.cs │ │ │ ├── ExampleAttribute.cs │ │ │ ├── NoAutoDocAttribute.cs │ │ │ ├── PSPropertySortAttribute.cs │ │ │ ├── PSPropertyViewAttribute.cs │ │ │ ├── PSReturnableObjectAttribute.cs │ │ │ ├── RelatedCmdletsAttribute.cs │ │ │ └── SupportsWildcardsAttribute.cs │ │ ├── Impersonator.cs │ │ ├── LibraryConfiguration.cs │ │ ├── PS1XMLGenerator.cs │ │ ├── SecureStringHelpers.cs │ │ └── XMLHelpGenerator.cs │ ├── DNS │ │ ├── Header.cs │ │ ├── Question.cs │ │ ├── RR.cs │ │ ├── RecordReader.cs │ │ ├── Records │ │ │ ├── NotUsed │ │ │ │ ├── RecordA6.cs │ │ │ │ ├── RecordAPL.cs │ │ │ │ ├── RecordATMA.cs │ │ │ │ ├── RecordCERT.cs │ │ │ │ ├── RecordDHCID.cs │ │ │ │ ├── RecordDNSKEY.cs │ │ │ │ ├── RecordEID.cs │ │ │ │ ├── RecordGID.cs │ │ │ │ ├── RecordHIP.cs │ │ │ │ ├── RecordIPSECKEY.cs │ │ │ │ ├── RecordNIMLOC.cs │ │ │ │ ├── RecordNSEC.cs │ │ │ │ ├── RecordNSEC3.cs │ │ │ │ ├── RecordNSEC3PARAM.cs │ │ │ │ ├── RecordOPT.cs │ │ │ │ ├── RecordRRSIG.cs │ │ │ │ ├── RecordSINK.cs │ │ │ │ ├── RecordSPF.cs │ │ │ │ ├── RecordSSHFP.cs │ │ │ │ ├── RecordUID.cs │ │ │ │ ├── RecordUINFO.cs │ │ │ │ ├── RecordUNSPEC.cs │ │ │ │ └── RecordUnknown.cs │ │ │ ├── Obsolete │ │ │ │ ├── RecordGPOS.cs │ │ │ │ ├── RecordMD.cs │ │ │ │ ├── RecordMF.cs │ │ │ │ ├── RecordNSAPPTR.cs │ │ │ │ └── RecordNXT.cs │ │ │ ├── Record.cs │ │ │ ├── RecordA.cs │ │ │ ├── RecordAAAA.cs │ │ │ ├── RecordAFSDB.cs │ │ │ ├── RecordCNAME.cs │ │ │ ├── RecordDNAME.cs │ │ │ ├── RecordDS.cs │ │ │ ├── RecordHINFO.cs │ │ │ ├── RecordISDN.cs │ │ │ ├── RecordKEY.cs │ │ │ ├── RecordKX.cs │ │ │ ├── RecordLOC.cs │ │ │ ├── RecordMB.cs │ │ │ ├── RecordMG.cs │ │ │ ├── RecordMINFO.cs │ │ │ ├── RecordMR.cs │ │ │ ├── RecordMX.cs │ │ │ ├── RecordNAPTR.cs │ │ │ ├── RecordNS.cs │ │ │ ├── RecordNSAP.cs │ │ │ ├── RecordNULL.cs │ │ │ ├── RecordPTR.cs │ │ │ ├── RecordPX.cs │ │ │ ├── RecordRP.cs │ │ │ ├── RecordRT.cs │ │ │ ├── RecordSIG.cs │ │ │ ├── RecordSOA.cs │ │ │ ├── RecordSRV.cs │ │ │ ├── RecordTKEY.cs │ │ │ ├── RecordTSIG.cs │ │ │ ├── RecordTXT.cs │ │ │ ├── RecordWKS.cs │ │ │ ├── RecordX25.cs │ │ │ └── totla.txt │ │ ├── Request.cs │ │ ├── Resolver.cs │ │ ├── Response.cs │ │ ├── Root │ │ │ └── named_root.txt │ │ └── Structs.cs │ ├── FileSystem │ │ └── JunctionPoints.cs │ ├── HTApps │ │ ├── HTAppFiles.cs │ │ ├── ImageEncoding.cs │ │ ├── ScriptForm.Designer.cs │ │ ├── ScriptForm.cs │ │ ├── ScriptForm.resx │ │ └── ScriptInterface.cs │ ├── HtmlAgilityPack │ │ ├── EncodingFoundException.cs │ │ ├── HtmlAttribute.cs │ │ ├── HtmlAttributeCollection.cs │ │ ├── HtmlCmdLine.cs │ │ ├── HtmlCommentNode.cs │ │ ├── HtmlConsoleListener.cs │ │ ├── HtmlDocument.PathMethods.cs │ │ ├── HtmlDocument.Xpath.cs │ │ ├── HtmlDocument.cs │ │ ├── HtmlElementFlag.cs │ │ ├── HtmlEntity.cs │ │ ├── HtmlNameTable.cs │ │ ├── HtmlNode.Xpath.cs │ │ ├── HtmlNode.cs │ │ ├── HtmlNodeCollection.cs │ │ ├── HtmlNodeNavigator.cs │ │ ├── HtmlNodeType.cs │ │ ├── HtmlParseError.cs │ │ ├── HtmlParseErrorCode.cs │ │ ├── HtmlTextNode.cs │ │ ├── HtmlWeb.Xpath.cs │ │ ├── HtmlWeb.cs │ │ ├── HtmlWebException.cs │ │ ├── IOLibrary.cs │ │ ├── MixedCodeDocument.cs │ │ ├── MixedCodeDocumentCodeFragment.cs │ │ ├── MixedCodeDocumentFragment.cs │ │ ├── MixedCodeDocumentFragmentList.cs │ │ ├── MixedCodeDocumentFragmentType.cs │ │ ├── MixedCodeDocumentTextFragment.cs │ │ ├── NameValuePair.cs │ │ ├── NameValuePairList.cs │ │ ├── Trace.FullFramework.cs │ │ ├── Trace.cs │ │ ├── Utilities.cs │ │ └── crc32.cs │ ├── MachineSID.cs │ ├── MicrosoftLive │ │ ├── Controls │ │ │ ├── LiveConnectSessionChangedEventArgs.cs │ │ │ ├── SignInDialog.Designer.cs │ │ │ ├── SignInDialog.cs │ │ │ └── SignInDialog.resx │ │ ├── Json.cs │ │ ├── LiveAuthException.cs │ │ ├── LiveAuthHelper.cs │ │ ├── LiveConnectClient.Overrides.cs │ │ ├── LiveConnectClient.cs │ │ ├── LiveConnectClientAsyncResult.cs │ │ ├── LiveConnectException.cs │ │ ├── LiveConnectItem.cs │ │ ├── LiveConnectSession.cs │ │ ├── LiveConnectSessionStatus.cs │ │ ├── LiveDownloadCompletedEventArgs.cs │ │ ├── LiveDownloadProgressChangedEventArgs.cs │ │ ├── LiveDownloadResult.cs │ │ ├── LiveLoginResult.cs │ │ ├── LiveOperationCompletedEventArgs.cs │ │ ├── LiveOperationProgress.cs │ │ ├── LiveOperationResult.cs │ │ ├── LiveUploadProgressChangedEventArgs.cs │ │ ├── LoginCompltedEventArgs.cs │ │ ├── QueryParameters.cs │ │ ├── ResponseType.cs │ │ └── ThemeType.cs │ ├── MicrosoftOffice │ │ ├── Automation │ │ │ ├── BindingFactory.cs │ │ │ ├── DynamicTypeManager.cs │ │ │ ├── EOperationType.cs │ │ │ ├── ErrorStrings.cs │ │ │ ├── Exceptions │ │ │ │ ├── AlreadyDefinedOperationNameException.cs │ │ │ │ ├── NoOperationNameDefinedException.cs │ │ │ │ └── OperationCallFailedException.cs │ │ │ ├── IDynamic.cs │ │ │ ├── IFieldCall.cs │ │ │ ├── IGetSetOperations.cs │ │ │ ├── IIndexerCall.cs │ │ │ ├── IMethodCall.cs │ │ │ ├── IMethodOperations.cs │ │ │ ├── IOperationLastCallParameters.cs │ │ │ ├── IParameterBuilder.cs │ │ │ ├── IPropertyCall.cs │ │ │ └── Implementation │ │ │ │ ├── CommonLateBindingOperations.cs │ │ │ │ ├── Invoker.cs │ │ │ │ └── ParameterBuilder.cs │ │ ├── Excel │ │ │ ├── ExcelCell.cs │ │ │ ├── ExcelColumn.cs │ │ │ ├── ExcelHeaderFooter.cs │ │ │ ├── ExcelPackage.cs │ │ │ ├── ExcelRow.cs │ │ │ ├── ExcelStyles.cs │ │ │ ├── ExcelWorkbook.cs │ │ │ ├── ExcelWorksheet.cs │ │ │ ├── ExcelWorksheetView.cs │ │ │ └── ExcelWorksheets.cs │ │ ├── OfficeProperties.cs │ │ └── Word │ │ │ ├── Border.cs │ │ │ ├── Charts │ │ │ ├── Axis.cs │ │ │ ├── BarChart.cs │ │ │ ├── Chart.cs │ │ │ ├── LineChart.cs │ │ │ ├── PieChart.cs │ │ │ └── XElementHelpers.cs │ │ │ ├── Container.cs │ │ │ ├── CustomProperty.cs │ │ │ ├── DocProperty.cs │ │ │ ├── DocX.cs │ │ │ ├── Footer.cs │ │ │ ├── Footers.cs │ │ │ ├── FormattedText.cs │ │ │ ├── Formatting.cs │ │ │ ├── Header.cs │ │ │ ├── Headers.cs │ │ │ ├── HelperFunctions.cs │ │ │ ├── Hyperlink.cs │ │ │ ├── Image.cs │ │ │ ├── PageLayout.cs │ │ │ ├── Paragraph.cs │ │ │ ├── Picture.cs │ │ │ ├── Table.cs │ │ │ ├── _BaseClasses.cs │ │ │ ├── _Enumerations.cs │ │ │ └── _Extensions.cs │ ├── Mjollnir │ │ ├── ByteArrayExtensions.AsStream.cs │ │ ├── ByteArrayFactory.Create.cs │ │ ├── Collections │ │ │ ├── DictionaryExtensions.GetValueOrDefault.cs │ │ │ └── DictionaryExtensions.InvokeIfContainsKey.cs │ │ ├── ComponentModel │ │ │ └── PropertyChangedEventHandlerExtensions.Fire.cs │ │ ├── EventHandlerExtensions.Fire.cs │ │ ├── IO │ │ │ └── StreamExtensions.CopyTo.cs │ │ ├── Lock.Invoke.cs │ │ ├── StringFactory.Create.cs │ │ ├── ThrowArgumentException.If.cs │ │ ├── ThrowArgumentException.IfNull.cs │ │ └── ThrowArgumentException.IfOutOfRange.cs │ └── Network │ │ └── HostFileHandler.cs ├── Licenses │ ├── BZip2.txt │ ├── BouncyCastle.txt │ ├── ExcelPackage.txt │ ├── HTMLAgilityPack.txt │ ├── HeijdenDNS.txt │ ├── MicrosoftLive.txt │ └── Mjollnir.txt ├── Properties │ └── AssemblyInfo.cs ├── Providers │ ├── FileSystem │ │ ├── ZipFileArchive.cs │ │ ├── ZipFileContentDynamicParameters.cs │ │ ├── ZipFileContentReaderWriter.cs │ │ ├── ZipFileDriveInfo.cs │ │ ├── ZipFileItem.cs │ │ └── ZipFileProvider.cs │ └── OneDrive │ │ ├── OneDriveInfo.cs │ │ └── OneDriveProvider.cs ├── Resources │ ├── Certificates.Designer.cs │ ├── Certificates.resx │ ├── General.Designer.cs │ ├── General.resx │ ├── General │ │ ├── Format.txt │ │ ├── Prompt.txt │ │ └── Types.txt │ ├── Office.Designer.cs │ ├── Office.resx │ ├── Office │ │ ├── documentStyles.gz │ │ └── tableStyles.gz │ ├── SelfHostedPS.Designer.cs │ ├── SelfHostedPS.resx │ ├── SelfHostedPS │ │ ├── AssemblyData.cs │ │ ├── AssemblyInfo.cs │ │ ├── Commandline.cs │ │ ├── Common.cs │ │ ├── ConsoleHandler.cs │ │ ├── Host.cs │ │ ├── HostRawUserInterface.cs │ │ ├── HostUserInterface.cs │ │ ├── IntegratedServiceInstaller.cs │ │ ├── PSService.cs │ │ ├── ParameterItem.cs │ │ ├── Program.cs │ │ └── ServiceProgram.cs │ ├── Templates.Designer.cs │ ├── Templates.resx │ └── Templates │ │ ├── CrossThread.cs │ │ ├── Program.cs │ │ ├── StandardBlock.txt │ │ └── StringExtension.cs ├── SelfHosted │ ├── Dto │ │ └── SelfHostedPSInfo.cs │ └── Lib │ │ ├── NativeStructs.cs │ │ ├── ProxyDomain.cs │ │ ├── Signature.cs │ │ ├── SignatureHelper.cs │ │ └── WINTRUST.cs ├── Sorlov.PowerShell.csproj ├── Sorlov.PowerShell.psd1 ├── app.config └── packages.config └── docs ├── CNAME ├── _config.yml └── readme.md /README.md: -------------------------------------------------------------------------------- 1 | # Sorlov.PowerShell 2 | This is the public version of Sorlov.PowerShell Self-Hosted Executable Extensions for Powershell 3 | -------------------------------------------------------------------------------- /Sorlov.PowerShell.ExeBuilder/ComboListItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Sorlov.PowerShell.Builder 7 | { 8 | public class ComboListItem 9 | { 10 | public string Name; 11 | public T Value; 12 | 13 | public ComboListItem(string name, T value) 14 | { 15 | Name = name; 16 | Value = value; 17 | } 18 | public override string ToString() 19 | { 20 | return Name; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Sorlov.PowerShell.ExeBuilder/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Management; 5 | using System.Windows.Forms; 6 | 7 | namespace Sorlov.PowerShell.Builder 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// The main entry point for the application. 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new BuilderForm()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Sorlov.PowerShell.ExeBuilder/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Sorlov.PowerShell.ExeBuilder/Resources/exe.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DSorlov/Sorlov.PowerShell/f07bf27620aca92b635d7846fcaff02c28546c0b/Sorlov.PowerShell.ExeBuilder/Resources/exe.ico -------------------------------------------------------------------------------- /Sorlov.PowerShell.ExeBuilder/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Checks/CheckEmail.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] 4 | public class CheckEmail : CheckPattern 5 | { 6 | private const string regexp = @"[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?"; 7 | 8 | public CheckEmail() 9 | : base(regexp,"Could not validate email address") 10 | { 11 | } 12 | 13 | public CheckEmail(string message) 14 | : base(regexp,message) 15 | { 16 | } 17 | 18 | } -------------------------------------------------------------------------------- /Sorlov.PowerShell/Checks/CheckNotNull.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Management.Automation; 3 | 4 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] 5 | public class CheckNotNull : ValidateArgumentsAttribute 6 | { 7 | private string message = "Value may not be null"; 8 | 9 | public CheckNotNull(string message) 10 | { 11 | this.message = message; 12 | } 13 | 14 | public CheckNotNull() 15 | { 16 | } 17 | 18 | protected override void Validate(object arguments, EngineIntrinsics engineIntrinsics) 19 | { 20 | if (arguments==null) 21 | throw new CheckValidationException(message); 22 | } 23 | 24 | public string Message 25 | { 26 | get { return message; } 27 | set { this.message = value; } 28 | } 29 | 30 | } -------------------------------------------------------------------------------- /Sorlov.PowerShell/Checks/CheckNotNullOrEmpty.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Management.Automation; 3 | 4 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] 5 | public class CheckNotNullOrEmpty : ValidateArgumentsAttribute 6 | { 7 | private string message = "Value may not be null or empty"; 8 | 9 | public CheckNotNullOrEmpty(string message) 10 | { 11 | this.message = message; 12 | } 13 | 14 | public CheckNotNullOrEmpty() 15 | { 16 | } 17 | 18 | protected override void Validate(object arguments, EngineIntrinsics engineIntrinsics) 19 | { 20 | if (arguments==null) 21 | throw new CheckValidationException(message); 22 | 23 | if (arguments.ToString()==string.Empty) 24 | throw new CheckValidationException(message); 25 | } 26 | 27 | public string Message 28 | { 29 | get { return message; } 30 | set { this.message = value; } 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /Sorlov.PowerShell/Checks/CheckValidationException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | public class CheckValidationException: Exception 4 | { 5 | public CheckValidationException(string errorMessage) : base(errorMessage) {} 6 | public CheckValidationException(string errorMessage, Exception innerEx) : base(errorMessage, innerEx) {} 7 | } -------------------------------------------------------------------------------- /Sorlov.PowerShell/CmdLets/GetAssembly.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Management.Automation; 3 | using Sorlov.PowerShell.Lib.Core.Attributes; 4 | 5 | namespace Sorlov.PowerShell.Cmdlets 6 | { 7 | [Cmdlet(VerbsCommon.Get, "Assembly", SupportsShouldProcess = true)] 8 | [CmdletDescription("Returns a list of all loaded assemblies")] 9 | public class GetAssembly: PSCmdlet 10 | { 11 | 12 | #region "BeginProcessing" 13 | protected override void BeginProcessing() 14 | { 15 | WriteObject(AppDomain.CurrentDomain.GetAssemblies()); 16 | } 17 | #endregion 18 | 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/CmdLets/RegisterHTApps.cs: -------------------------------------------------------------------------------- 1 | using System.Management.Automation; 2 | using Sorlov.PowerShell.Lib.HTApps; 3 | 4 | namespace Sorlov.PowerShell.Cmdlets 5 | { 6 | [Cmdlet(VerbsLifecycle.Register,"HTApps")] 7 | public class RegisterHTApps: PSCmdlet 8 | { 9 | protected override void BeginProcessing() 10 | { 11 | HTAppFiles.Associate(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Dto/Adfs/AdfsAudience.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Sorlov.PowerShell.Dto.Adfs 7 | { 8 | public class AdfsAudience 9 | { 10 | private string server; 11 | private string audience; 12 | 13 | public string Server { get { return server; } } 14 | public string Audience { get { return audience; } } 15 | 16 | public AdfsAudience(string server, string audience) 17 | { 18 | this.server = server; 19 | this.audience = audience; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Dto/MicrosoftOffice/RowCollection.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | 4 | namespace Sorlov.PowerShell.Dto.MicrosoftOffice 5 | { 6 | public class RowCollection : IEnumerable 7 | { 8 | private List rows; 9 | 10 | internal RowCollection(List rows) 11 | { 12 | this.rows = rows; 13 | } 14 | 15 | public object this[int index] 16 | { 17 | get 18 | { 19 | return rows[index]; 20 | } 21 | } 22 | 23 | public IEnumerator GetEnumerator() 24 | { 25 | return new RowCollectionEnumerator(rows); 26 | } 27 | 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Dto/MicrosoftOffice/Worksheet.cs: -------------------------------------------------------------------------------- 1 | namespace Sorlov.PowerShell.Dto.MicrosoftOffice 2 | { 3 | public class Worksheet 4 | { 5 | private string name; 6 | public string Name { get { return name; } internal set { name = value; } } 7 | 8 | private RowCollection rows; 9 | public RowCollection Rows { get { return rows; } internal set { rows = value; } } 10 | 11 | internal Worksheet() 12 | { 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Dto/Network/HTTPHeaderResult.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Sorlov.PowerShell.Dto.Network 7 | { 8 | public class HTTPHeaderResult 9 | { 10 | private string header; 11 | private string value; 12 | public string Header { get { return header; } } 13 | public string Value { get { return value; } } 14 | public HTTPHeaderResult(string Header, string Value) 15 | { 16 | header = Header; 17 | value = Value; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Dto/Network/HostInfo.cs: -------------------------------------------------------------------------------- 1 | namespace Sorlov.PowerShell.Dto.Network 2 | { 3 | public class HostInfo 4 | { 5 | 6 | private string hostName; 7 | private string dnsName; 8 | private System.Net.IPAddress[] adresses; 9 | 10 | public HostInfo(string hostName, string dnsName, System.Net.IPAddress[] adresses) 11 | { 12 | this.hostName = hostName; 13 | this.dnsName = dnsName; 14 | this.adresses = adresses; 15 | } 16 | 17 | public string Hostname 18 | { 19 | get { return hostName; } 20 | } 21 | 22 | public string DNSName 23 | { 24 | get { return dnsName; } 25 | } 26 | 27 | public System.Net.IPAddress[] Adresses 28 | { 29 | get { return adresses; } 30 | } 31 | 32 | public override string ToString() 33 | { 34 | return hostName; 35 | } 36 | 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Extensions/EnumExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel; 3 | using System.Reflection; 4 | 5 | namespace Sorlov.PowerShell 6 | { 7 | public static class EnumExtensions 8 | { 9 | public static string GetEnumDescription(this Enum value) 10 | { 11 | FieldInfo fi = value.GetType().GetField(value.ToString()); 12 | 13 | DescriptionAttribute[] attributes = 14 | (DescriptionAttribute[])fi.GetCustomAttributes( 15 | typeof(DescriptionAttribute), 16 | false); 17 | 18 | if (attributes != null && 19 | attributes.Length > 0) 20 | return attributes[0].Description; 21 | else 22 | return value.ToString(); 23 | } 24 | 25 | public static T FromString(string value) 26 | { 27 | return (T) Enum.Parse(typeof(T),value); 28 | } 29 | 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/API/CRYPTUI.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | namespace Sorlov.PowerShell.SelfHosted.Lib 5 | { 6 | public class CRYPTUI 7 | { 8 | [DllImport("cryptUI.dll", CharSet = CharSet.Unicode, SetLastError = true)] 9 | public static extern bool CryptUIWizDigitalSign(uint dwFlags, IntPtr hwndParentNotUsed, IntPtr pwszWizardTitleNotUsed, IntPtr pDigitalSignInfo, IntPtr ppSignContextNotUsed); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/API/KERNEL32.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | namespace Sorlov.PowerShell.Lib.API 5 | { 6 | public class KERNEL32 7 | { 8 | [Flags] 9 | public enum MoveFileFlags 10 | { 11 | None = 0, 12 | ReplaceExisting = 1, 13 | CopyAllowed = 2, 14 | DelayUntilReboot = 4, 15 | WriteThrough = 8, 16 | CreateHardlink = 16, 17 | FailIfNotTrackable = 32, 18 | } 19 | 20 | 21 | [DllImport("kernel32.dll", CharSet = CharSet.Auto)] 22 | public extern static bool CloseHandle(IntPtr handle); 23 | 24 | [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)] 25 | public static extern bool MoveFileEx( 26 | string lpExistingFileName, 27 | string lpNewFileName, 28 | MoveFileFlags dwFlags); 29 | } 30 | 31 | 32 | } 33 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/API/WININET.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | 3 | namespace Sorlov.PowerShell.Lib.API 4 | { 5 | public class WININET 6 | { 7 | [DllImport("wininet.dll")] 8 | public extern static bool InternetGetConnectedState(out int Description, int ReservedValue); 9 | 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/Application/CallerProxyEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Sorlov.PowerShell.Lib.Application 7 | { 8 | public class CallerProxyEventArgs : EventArgs 9 | { 10 | public string StreamName { get; set; } 11 | public string Text { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/Application/Framework.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace Sorlov.PowerShell.SelfHosted.Lib.Application 4 | { 5 | public enum Framework 6 | { 7 | [Description("2.0")] 8 | Framework20 = 0, 9 | [Description("3.5")] 10 | Framework35 = 1, 11 | [Description("4.0")] 12 | Framework40 = 2 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/Application/Platform.cs: -------------------------------------------------------------------------------- 1 | namespace Sorlov.PowerShell.SelfHosted.Lib.Application 2 | { 3 | public enum Platform 4 | { 5 | anycpu = 0, 6 | x86 = 1, 7 | x64 = 2 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/Application/ServiceData.cs: -------------------------------------------------------------------------------- 1 | namespace Sorlov.PowerShell.SelfHosted.Lib.Application 2 | { 3 | public class ServiceData : ApplicationData 4 | { 5 | public string ServiceName; 6 | public string DisplayName; 7 | public string Description; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/Application/SigningInformation.cs: -------------------------------------------------------------------------------- 1 | using System.Security.Cryptography.X509Certificates; 2 | 3 | namespace Sorlov.PowerShell.SelfHosted.Lib.Application 4 | { 5 | public class SingingInformation 6 | { 7 | public X509Certificate2 Certificate = null; 8 | public string TimestampServer = string.Empty; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/Application/ThreadMode.cs: -------------------------------------------------------------------------------- 1 | namespace Sorlov.PowerShell.SelfHosted.Lib.Application 2 | { 3 | public enum ThreadMode 4 | { 5 | STA = 0, 6 | MTA = 1 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/ASN1Generator.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace Org.BouncyCastle.Asn1 4 | { 5 | public abstract class Asn1Generator 6 | { 7 | private Stream _out; 8 | 9 | protected Asn1Generator( 10 | Stream outStream) 11 | { 12 | _out = outStream; 13 | } 14 | 15 | protected Stream Out 16 | { 17 | get { return _out; } 18 | } 19 | 20 | public abstract void AddObject(Asn1Encodable obj); 21 | 22 | public abstract Stream GetRawOutputStream(); 23 | 24 | public abstract void Close(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/ASN1OctetStringParser.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace Org.BouncyCastle.Asn1 4 | { 5 | public interface Asn1OctetStringParser 6 | : IAsn1Convertible 7 | { 8 | Stream GetOctetStream(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/ASN1SequenceParser.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Asn1 2 | { 3 | public interface Asn1SequenceParser 4 | : IAsn1Convertible 5 | { 6 | IAsn1Convertible ReadObject(); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/ASN1SetParser.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Asn1 2 | { 3 | public interface Asn1SetParser 4 | : IAsn1Convertible 5 | { 6 | IAsn1Convertible ReadObject(); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/ASN1TaggedObjectParser.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Asn1 2 | { 3 | public interface Asn1TaggedObjectParser 4 | : IAsn1Convertible 5 | { 6 | int TagNo { get; } 7 | 8 | IAsn1Convertible GetObjectParser(int tag, bool isExplicit); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/Asn1Exception.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | 4 | namespace Org.BouncyCastle.Asn1 5 | { 6 | public class Asn1Exception 7 | : IOException 8 | { 9 | public Asn1Exception() 10 | : base() 11 | { 12 | } 13 | 14 | public Asn1Exception( 15 | string message) 16 | : base(message) 17 | { 18 | } 19 | 20 | public Asn1Exception( 21 | string message, 22 | Exception exception) 23 | : base(message, exception) 24 | { 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/Asn1Null.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Asn1 2 | { 3 | /** 4 | * A Null object. 5 | */ 6 | public abstract class Asn1Null 7 | : Asn1Object 8 | { 9 | internal Asn1Null() 10 | { 11 | } 12 | 13 | public override string ToString() 14 | { 15 | return "NULL"; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/Asn1ParsingException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Asn1 4 | { 5 | public class Asn1ParsingException 6 | : InvalidOperationException 7 | { 8 | public Asn1ParsingException() 9 | : base() 10 | { 11 | } 12 | 13 | public Asn1ParsingException( 14 | string message) 15 | : base(message) 16 | { 17 | } 18 | 19 | public Asn1ParsingException( 20 | string message, 21 | Exception exception) 22 | : base(message, exception) 23 | { 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/BEROctetStringParser.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | using Org.BouncyCastle.Utilities.IO; 4 | 5 | namespace Org.BouncyCastle.Asn1 6 | { 7 | public class BerOctetStringParser 8 | : Asn1OctetStringParser 9 | { 10 | private readonly Asn1StreamParser _parser; 11 | 12 | internal BerOctetStringParser( 13 | Asn1StreamParser parser) 14 | { 15 | _parser = parser; 16 | } 17 | 18 | public Stream GetOctetStream() 19 | { 20 | return new ConstructedOctetStream(_parser); 21 | } 22 | 23 | public Asn1Object ToAsn1Object() 24 | { 25 | try 26 | { 27 | return new BerOctetString(Streams.ReadAll(GetOctetStream())); 28 | } 29 | catch (IOException e) 30 | { 31 | throw new Asn1ParsingException("IOException converting stream to byte array: " + e.Message, e); 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/BERSequenceGenerator.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace Org.BouncyCastle.Asn1 4 | { 5 | public class BerSequenceGenerator 6 | : BerGenerator 7 | { 8 | public BerSequenceGenerator( 9 | Stream outStream) 10 | : base(outStream) 11 | { 12 | WriteBerHeader(Asn1Tags.Constructed | Asn1Tags.Sequence); 13 | } 14 | 15 | public BerSequenceGenerator( 16 | Stream outStream, 17 | int tagNo, 18 | bool isExplicit) 19 | : base(outStream, tagNo, isExplicit) 20 | { 21 | WriteBerHeader(Asn1Tags.Constructed | Asn1Tags.Sequence); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/BERSequenceParser.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Asn1 2 | { 3 | public class BerSequenceParser 4 | : Asn1SequenceParser 5 | { 6 | private readonly Asn1StreamParser _parser; 7 | 8 | internal BerSequenceParser( 9 | Asn1StreamParser parser) 10 | { 11 | this._parser = parser; 12 | } 13 | 14 | public IAsn1Convertible ReadObject() 15 | { 16 | return _parser.ReadObject(); 17 | } 18 | 19 | public Asn1Object ToAsn1Object() 20 | { 21 | return new BerSequence(_parser.ReadVector()); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/BERSetGenerator.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace Org.BouncyCastle.Asn1 4 | { 5 | public class BerSetGenerator 6 | : BerGenerator 7 | { 8 | public BerSetGenerator( 9 | Stream outStream) 10 | : base(outStream) 11 | { 12 | WriteBerHeader(Asn1Tags.Constructed | Asn1Tags.Set); 13 | } 14 | 15 | public BerSetGenerator( 16 | Stream outStream, 17 | int tagNo, 18 | bool isExplicit) 19 | : base(outStream, tagNo, isExplicit) 20 | { 21 | WriteBerHeader(Asn1Tags.Constructed | Asn1Tags.Set); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/BERSetParser.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Asn1 2 | { 3 | public class BerSetParser 4 | : Asn1SetParser 5 | { 6 | private readonly Asn1StreamParser _parser; 7 | 8 | internal BerSetParser( 9 | Asn1StreamParser parser) 10 | { 11 | this._parser = parser; 12 | } 13 | 14 | public IAsn1Convertible ReadObject() 15 | { 16 | return _parser.ReadObject(); 17 | } 18 | 19 | public Asn1Object ToAsn1Object() 20 | { 21 | return new BerSet(_parser.ReadVector(), false); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/BerApplicationSpecific.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Asn1 2 | { 3 | public class BerApplicationSpecific 4 | : DerApplicationSpecific 5 | { 6 | public BerApplicationSpecific( 7 | int tagNo, 8 | Asn1EncodableVector vec) 9 | : base(tagNo, vec) 10 | { 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/BerApplicationSpecificParser.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Asn1 2 | { 3 | public class BerApplicationSpecificParser 4 | : IAsn1ApplicationSpecificParser 5 | { 6 | private readonly int tag; 7 | private readonly Asn1StreamParser parser; 8 | 9 | internal BerApplicationSpecificParser( 10 | int tag, 11 | Asn1StreamParser parser) 12 | { 13 | this.tag = tag; 14 | this.parser = parser; 15 | } 16 | 17 | public IAsn1Convertible ReadObject() 18 | { 19 | return parser.ReadObject(); 20 | } 21 | 22 | public Asn1Object ToAsn1Object() 23 | { 24 | return new BerApplicationSpecific(tag, parser.ReadVector()); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/BerNull.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Asn1 4 | { 5 | /** 6 | * A BER Null object. 7 | */ 8 | public class BerNull 9 | : DerNull 10 | { 11 | public static new readonly BerNull Instance = new BerNull(0); 12 | 13 | [Obsolete("Use static Instance object")] 14 | public BerNull() 15 | { 16 | } 17 | 18 | private BerNull(int dummy) : base(dummy) 19 | { 20 | } 21 | 22 | internal override void Encode( 23 | DerOutputStream derOut) 24 | { 25 | if (derOut is Asn1OutputStream || derOut is BerOutputStream) 26 | { 27 | derOut.WriteByte(Asn1Tags.Null); 28 | } 29 | else 30 | { 31 | base.Encode(derOut); 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/DERExternalParser.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Asn1 2 | { 3 | public class DerExternalParser 4 | : Asn1Encodable 5 | { 6 | private readonly Asn1StreamParser _parser; 7 | 8 | public DerExternalParser(Asn1StreamParser parser) 9 | { 10 | this._parser = parser; 11 | } 12 | 13 | public IAsn1Convertible ReadObject() 14 | { 15 | return _parser.ReadObject(); 16 | } 17 | 18 | public override Asn1Object ToAsn1Object() 19 | { 20 | return new DerExternal(_parser.ReadVector()); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/DEROctetStringParser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | 4 | namespace Org.BouncyCastle.Asn1 5 | { 6 | public class DerOctetStringParser 7 | : Asn1OctetStringParser 8 | { 9 | private readonly DefiniteLengthInputStream stream; 10 | 11 | internal DerOctetStringParser( 12 | DefiniteLengthInputStream stream) 13 | { 14 | this.stream = stream; 15 | } 16 | 17 | public Stream GetOctetStream() 18 | { 19 | return stream; 20 | } 21 | 22 | public Asn1Object ToAsn1Object() 23 | { 24 | try 25 | { 26 | return new DerOctetString(stream.ToArray()); 27 | } 28 | catch (IOException e) 29 | { 30 | throw new InvalidOperationException("IOException converting stream to byte array: " + e.Message, e); 31 | } 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/DERSequenceGenerator.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace Org.BouncyCastle.Asn1 4 | { 5 | public class DerSequenceGenerator 6 | : DerGenerator 7 | { 8 | private readonly MemoryStream _bOut = new MemoryStream(); 9 | 10 | public DerSequenceGenerator( 11 | Stream outStream) 12 | : base(outStream) 13 | { 14 | } 15 | 16 | public DerSequenceGenerator( 17 | Stream outStream, 18 | int tagNo, 19 | bool isExplicit) 20 | : base(outStream, tagNo, isExplicit) 21 | { 22 | } 23 | 24 | public override void AddObject( 25 | Asn1Encodable obj) 26 | { 27 | new DerOutputStream(_bOut).WriteObject(obj); 28 | } 29 | 30 | public override Stream GetRawOutputStream() 31 | { 32 | return _bOut; 33 | } 34 | 35 | public override void Close() 36 | { 37 | WriteDerEncoded(Asn1Tags.Constructed | Asn1Tags.Sequence, _bOut.ToArray()); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/DERSequenceParser.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Asn1 2 | { 3 | public class DerSequenceParser 4 | : Asn1SequenceParser 5 | { 6 | private readonly Asn1StreamParser _parser; 7 | 8 | internal DerSequenceParser( 9 | Asn1StreamParser parser) 10 | { 11 | this._parser = parser; 12 | } 13 | 14 | public IAsn1Convertible ReadObject() 15 | { 16 | return _parser.ReadObject(); 17 | } 18 | 19 | public Asn1Object ToAsn1Object() 20 | { 21 | return new DerSequence(_parser.ReadVector()); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/DERSetGenerator.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace Org.BouncyCastle.Asn1 4 | { 5 | public class DerSetGenerator 6 | : DerGenerator 7 | { 8 | private readonly MemoryStream _bOut = new MemoryStream(); 9 | 10 | public DerSetGenerator( 11 | Stream outStream) 12 | : base(outStream) 13 | { 14 | } 15 | 16 | public DerSetGenerator( 17 | Stream outStream, 18 | int tagNo, 19 | bool isExplicit) 20 | : base(outStream, tagNo, isExplicit) 21 | { 22 | } 23 | 24 | public override void AddObject( 25 | Asn1Encodable obj) 26 | { 27 | new DerOutputStream(_bOut).WriteObject(obj); 28 | } 29 | 30 | public override Stream GetRawOutputStream() 31 | { 32 | return _bOut; 33 | } 34 | 35 | public override void Close() 36 | { 37 | WriteDerEncoded(Asn1Tags.Constructed | Asn1Tags.Set, _bOut.ToArray()); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/DERSetParser.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Asn1 2 | { 3 | public class DerSetParser 4 | : Asn1SetParser 5 | { 6 | private readonly Asn1StreamParser _parser; 7 | 8 | internal DerSetParser( 9 | Asn1StreamParser parser) 10 | { 11 | this._parser = parser; 12 | } 13 | 14 | public IAsn1Convertible ReadObject() 15 | { 16 | return _parser.ReadObject(); 17 | } 18 | 19 | public Asn1Object ToAsn1Object() 20 | { 21 | return new DerSet(_parser.ReadVector(), false); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/DerNull.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Asn1 4 | { 5 | /** 6 | * A Null object. 7 | */ 8 | public class DerNull 9 | : Asn1Null 10 | { 11 | public static readonly DerNull Instance = new DerNull(0); 12 | 13 | byte[] zeroBytes = new byte[0]; 14 | 15 | [Obsolete("Use static Instance object")] 16 | public DerNull() 17 | { 18 | } 19 | 20 | protected internal DerNull(int dummy) 21 | { 22 | } 23 | 24 | internal override void Encode( 25 | DerOutputStream derOut) 26 | { 27 | derOut.WriteEncoded(Asn1Tags.Null, zeroBytes); 28 | } 29 | 30 | protected override bool Asn1Equals( 31 | Asn1Object asn1Object) 32 | { 33 | return asn1Object is DerNull; 34 | } 35 | 36 | protected override int Asn1GetHashCode() 37 | { 38 | return -1; 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/DerOctetString.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Asn1 2 | { 3 | public class DerOctetString 4 | : Asn1OctetString 5 | { 6 | /// The octets making up the octet string. 7 | public DerOctetString( 8 | byte[] str) 9 | : base(str) 10 | { 11 | } 12 | 13 | public DerOctetString( 14 | Asn1Encodable obj) 15 | : base(obj) 16 | { 17 | } 18 | 19 | internal override void Encode( 20 | DerOutputStream derOut) 21 | { 22 | derOut.WriteEncoded(Asn1Tags.OctetString, str); 23 | } 24 | 25 | internal static void Encode( 26 | DerOutputStream derOut, 27 | byte[] bytes, 28 | int offset, 29 | int length) 30 | { 31 | derOut.WriteEncoded(Asn1Tags.OctetString, bytes, offset, length); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/DerStringBase.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Asn1 2 | { 3 | public abstract class DerStringBase 4 | : Asn1Object, IAsn1String 5 | { 6 | protected DerStringBase() 7 | { 8 | } 9 | 10 | public abstract string GetString(); 11 | 12 | public override string ToString() 13 | { 14 | return GetString(); 15 | } 16 | 17 | protected override int Asn1GetHashCode() 18 | { 19 | return GetString().GetHashCode(); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/IAsn1ApplicationSpecificParser.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Asn1 2 | { 3 | public interface IAsn1ApplicationSpecificParser 4 | : IAsn1Convertible 5 | { 6 | IAsn1Convertible ReadObject(); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/IAsn1Choice.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace Org.BouncyCastle.Asn1 3 | { 4 | /** 5 | * Marker interface for CHOICE objects - if you implement this in a roll-your-own 6 | * object, any attempt to tag the object implicitly will convert the tag to an 7 | * explicit one as the encoding rules require. 8 | *

9 | * If you use this interface your class should also implement the getInstance 10 | * pattern which takes a tag object and the tagging mode used. 11 | *

12 | */ 13 | public interface IAsn1Choice 14 | { 15 | // marker interface 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/IAsn1Convertible.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Asn1 2 | { 3 | public interface IAsn1Convertible 4 | { 5 | Asn1Object ToAsn1Object(); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/IAsn1String.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Asn1 2 | { 3 | /** 4 | * basic interface for Der string objects. 5 | */ 6 | public interface IAsn1String 7 | { 8 | string GetString(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/LazyASN1InputStream.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace Org.BouncyCastle.Asn1 4 | { 5 | public class LazyAsn1InputStream 6 | : Asn1InputStream 7 | { 8 | public LazyAsn1InputStream( 9 | byte[] input) 10 | : base(input) 11 | { 12 | } 13 | 14 | public LazyAsn1InputStream( 15 | Stream inputStream) 16 | : base(inputStream) 17 | { 18 | } 19 | 20 | internal override DerSequence CreateDerSequence( 21 | DefiniteLengthInputStream dIn) 22 | { 23 | return new LazyDerSequence(dIn.ToArray()); 24 | } 25 | 26 | internal override DerSet CreateDerSet( 27 | DefiniteLengthInputStream dIn) 28 | { 29 | return new LazyDerSet(dIn.ToArray()); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/LimitedInputStream.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | using Org.BouncyCastle.Utilities.IO; 4 | 5 | namespace Org.BouncyCastle.Asn1 6 | { 7 | internal abstract class LimitedInputStream 8 | : BaseInputStream 9 | { 10 | protected readonly Stream _in; 11 | private int _limit; 12 | 13 | internal LimitedInputStream( 14 | Stream inStream, 15 | int limit) 16 | { 17 | this._in = inStream; 18 | this._limit = limit; 19 | } 20 | 21 | internal virtual int GetRemaining() 22 | { 23 | // TODO: maybe one day this can become more accurate 24 | return _limit; 25 | } 26 | 27 | protected virtual void SetParentEofDetect(bool on) 28 | { 29 | if (_in is IndefiniteLengthInputStream) 30 | { 31 | ((IndefiniteLengthInputStream)_in).SetEofOn00(on); 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/cmp/PKIConfirmContent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Asn1.Cmp 4 | { 5 | public class PkiConfirmContent 6 | : Asn1Encodable 7 | { 8 | public static PkiConfirmContent GetInstance(object obj) 9 | { 10 | if (obj is PkiConfirmContent) 11 | return (PkiConfirmContent)obj; 12 | 13 | if (obj is Asn1Null) 14 | return new PkiConfirmContent(); 15 | 16 | throw new ArgumentException("Invalid object: " + obj.GetType().Name, "obj"); 17 | } 18 | 19 | public PkiConfirmContent() 20 | { 21 | } 22 | 23 | /** 24 | *
25 | 		 * PkiConfirmContent ::= NULL
26 | 		 * 
27 | * @return a basic ASN.1 object representation. 28 | */ 29 | public override Asn1Object ToAsn1Object() 30 | { 31 | return DerNull.Instance; 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/cms/Attributes.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Asn1.Cms 2 | { 3 | public class Attributes 4 | : Asn1Encodable 5 | { 6 | private readonly Asn1Set attributes; 7 | 8 | private Attributes(Asn1Set attributes) 9 | { 10 | this.attributes = attributes; 11 | } 12 | 13 | public Attributes(Asn1EncodableVector v) 14 | { 15 | attributes = new BerSet(v); 16 | } 17 | 18 | public static Attributes GetInstance(object obj) 19 | { 20 | if (obj is Attributes) 21 | return (Attributes)obj; 22 | 23 | if (obj != null) 24 | return new Attributes(Asn1Set.GetInstance(obj)); 25 | 26 | return null; 27 | } 28 | 29 | /** 30 | *
31 | 		 * Attributes ::=
32 | 		 *   SET SIZE(1..MAX) OF Attribute -- according to RFC 5652
33 | 		 * 
34 | * @return 35 | */ 36 | public override Asn1Object ToAsn1Object() 37 | { 38 | return attributes; 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/cms/CMSAttributes.cs: -------------------------------------------------------------------------------- 1 | using Org.BouncyCastle.Asn1.Pkcs; 2 | 3 | namespace Org.BouncyCastle.Asn1.Cms 4 | { 5 | public abstract class CmsAttributes 6 | { 7 | public static readonly DerObjectIdentifier ContentType = PkcsObjectIdentifiers.Pkcs9AtContentType; 8 | public static readonly DerObjectIdentifier MessageDigest = PkcsObjectIdentifiers.Pkcs9AtMessageDigest; 9 | public static readonly DerObjectIdentifier SigningTime = PkcsObjectIdentifiers.Pkcs9AtSigningTime; 10 | public static readonly DerObjectIdentifier CounterSignature = PkcsObjectIdentifiers.Pkcs9AtCounterSignature; 11 | public static readonly DerObjectIdentifier ContentHint = PkcsObjectIdentifiers.IdAAContentHint; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/crmf/SubsequentMessage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Asn1.Crmf 4 | { 5 | public class SubsequentMessage 6 | : DerInteger 7 | { 8 | public static readonly SubsequentMessage encrCert = new SubsequentMessage(0); 9 | public static readonly SubsequentMessage challengeResp = new SubsequentMessage(1); 10 | 11 | private SubsequentMessage(int value) 12 | : base(value) 13 | { 14 | } 15 | 16 | public static SubsequentMessage ValueOf(int value) 17 | { 18 | if (value == 0) 19 | return encrCert; 20 | 21 | if (value == 1) 22 | return challengeResp; 23 | 24 | throw new ArgumentException("unknown value: " + value, "value"); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/esf/CommitmentTypeIdentifier.cs: -------------------------------------------------------------------------------- 1 | using Org.BouncyCastle.Asn1.Pkcs; 2 | 3 | namespace Org.BouncyCastle.Asn1.Esf 4 | { 5 | public abstract class CommitmentTypeIdentifier 6 | { 7 | public static readonly DerObjectIdentifier ProofOfOrigin = PkcsObjectIdentifiers.IdCtiEtsProofOfOrigin; 8 | public static readonly DerObjectIdentifier ProofOfReceipt = PkcsObjectIdentifiers.IdCtiEtsProofOfReceipt; 9 | public static readonly DerObjectIdentifier ProofOfDelivery = PkcsObjectIdentifiers.IdCtiEtsProofOfDelivery; 10 | public static readonly DerObjectIdentifier ProofOfSender = PkcsObjectIdentifiers.IdCtiEtsProofOfSender; 11 | public static readonly DerObjectIdentifier ProofOfApproval = PkcsObjectIdentifiers.IdCtiEtsProofOfApproval; 12 | public static readonly DerObjectIdentifier ProofOfCreation = PkcsObjectIdentifiers.IdCtiEtsProofOfCreation; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/iana/IANAObjectIdentifiers.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Asn1.Iana 2 | { 3 | public abstract class IanaObjectIdentifiers 4 | { 5 | // id-SHA1 OBJECT IDENTIFIER ::= 6 | // {iso(1) identified-organization(3) dod(6) internet(1) security(5) mechanisms(5) ipsec(8) isakmpOakley(1)} 7 | // 8 | 9 | public static readonly DerObjectIdentifier IsakmpOakley = new DerObjectIdentifier("1.3.6.1.5.5.8.1"); 10 | 11 | public static readonly DerObjectIdentifier HmacMD5 = new DerObjectIdentifier(IsakmpOakley + ".1"); 12 | public static readonly DerObjectIdentifier HmacSha1 = new DerObjectIdentifier(IsakmpOakley + ".2"); 13 | 14 | public static readonly DerObjectIdentifier HmacTiger = new DerObjectIdentifier(IsakmpOakley + ".3"); 15 | 16 | public static readonly DerObjectIdentifier HmacRipeMD160 = new DerObjectIdentifier(IsakmpOakley + ".4"); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/isismtt/x509/AdmissionSyntax.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DSorlov/Sorlov.PowerShell/f07bf27620aca92b635d7846fcaff02c28546c0b/Sorlov.PowerShell/Lib/BouncyCastle/asn1/isismtt/x509/AdmissionSyntax.cs -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/kisa/KISAObjectIdentifiers.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Asn1.Kisa 2 | { 3 | public abstract class KisaObjectIdentifiers 4 | { 5 | public static readonly DerObjectIdentifier IdSeedCbc = new DerObjectIdentifier("1.2.410.200004.1.4"); 6 | public static readonly DerObjectIdentifier IdNpkiAppCmsSeedWrap = new DerObjectIdentifier("1.2.410.200004.7.1.1.1"); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/misc/NetscapeRevocationURL.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Asn1.Misc 2 | { 3 | public class NetscapeRevocationUrl 4 | : DerIA5String 5 | { 6 | public NetscapeRevocationUrl(DerIA5String str) 7 | : base(str.GetString()) 8 | { 9 | } 10 | 11 | public override string ToString() 12 | { 13 | return "NetscapeRevocationUrl: " + this.GetString(); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/misc/VerisignCzagExtension.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Asn1.Misc 2 | { 3 | public class VerisignCzagExtension 4 | : DerIA5String 5 | { 6 | public VerisignCzagExtension(DerIA5String str) 7 | : base(str.GetString()) 8 | { 9 | } 10 | 11 | public override string ToString() 12 | { 13 | return "VerisignCzagExtension: " + this.GetString(); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/ntt/NTTObjectIdentifiers.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Asn1.Ntt 2 | { 3 | /// From RFC 3657 4 | public abstract class NttObjectIdentifiers 5 | { 6 | public static readonly DerObjectIdentifier IdCamellia128Cbc = new DerObjectIdentifier("1.2.392.200011.61.1.1.1.2"); 7 | public static readonly DerObjectIdentifier IdCamellia192Cbc = new DerObjectIdentifier("1.2.392.200011.61.1.1.1.3"); 8 | public static readonly DerObjectIdentifier IdCamellia256Cbc = new DerObjectIdentifier("1.2.392.200011.61.1.1.1.4"); 9 | 10 | public static readonly DerObjectIdentifier IdCamellia128Wrap = new DerObjectIdentifier("1.2.392.200011.61.1.1.3.2"); 11 | public static readonly DerObjectIdentifier IdCamellia192Wrap = new DerObjectIdentifier("1.2.392.200011.61.1.1.3.3"); 12 | public static readonly DerObjectIdentifier IdCamellia256Wrap = new DerObjectIdentifier("1.2.392.200011.61.1.1.3.4"); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/pkcs/AuthenticatedSafe.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Asn1.Pkcs 2 | { 3 | public class AuthenticatedSafe 4 | : Asn1Encodable 5 | { 6 | private readonly ContentInfo[] info; 7 | 8 | public AuthenticatedSafe( 9 | Asn1Sequence seq) 10 | { 11 | info = new ContentInfo[seq.Count]; 12 | 13 | for (int i = 0; i != info.Length; i++) 14 | { 15 | info[i] = ContentInfo.GetInstance(seq[i]); 16 | } 17 | } 18 | 19 | public AuthenticatedSafe( 20 | ContentInfo[] info) 21 | { 22 | this.info = (ContentInfo[]) info.Clone(); 23 | } 24 | 25 | public ContentInfo[] GetContentInfo() 26 | { 27 | return (ContentInfo[]) info.Clone(); 28 | } 29 | 30 | public override Asn1Object ToAsn1Object() 31 | { 32 | return new BerSequence(info); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/pkcs/KeyDerivationFunc.cs: -------------------------------------------------------------------------------- 1 | using Org.BouncyCastle.Asn1.X509; 2 | 3 | namespace Org.BouncyCastle.Asn1.Pkcs 4 | { 5 | public class KeyDerivationFunc 6 | : AlgorithmIdentifier 7 | { 8 | internal KeyDerivationFunc(Asn1Sequence seq) 9 | : base(seq) 10 | { 11 | } 12 | 13 | public KeyDerivationFunc( 14 | DerObjectIdentifier id, 15 | Asn1Encodable parameters) 16 | : base(id, parameters) 17 | { 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/smime/SMIMEAttributes.cs: -------------------------------------------------------------------------------- 1 | using Org.BouncyCastle.Asn1.Pkcs; 2 | 3 | namespace Org.BouncyCastle.Asn1.Smime 4 | { 5 | public abstract class SmimeAttributes 6 | { 7 | public static readonly DerObjectIdentifier SmimeCapabilities = PkcsObjectIdentifiers.Pkcs9AtSmimeCapabilities; 8 | public static readonly DerObjectIdentifier EncrypKeyPref = PkcsObjectIdentifiers.IdAAEncrypKeyPref; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/smime/SMIMECapabilitiesAttribute.cs: -------------------------------------------------------------------------------- 1 | using Org.BouncyCastle.Asn1.X509; 2 | 3 | namespace Org.BouncyCastle.Asn1.Smime 4 | { 5 | public class SmimeCapabilitiesAttribute 6 | : AttributeX509 7 | { 8 | public SmimeCapabilitiesAttribute( 9 | SmimeCapabilityVector capabilities) 10 | : base(SmimeAttributes.SmimeCapabilities, 11 | new DerSet(new DerSequence(capabilities.ToAsn1EncodableVector()))) 12 | { 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/util/Dump.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | 4 | namespace Org.BouncyCastle.Asn1.Utilities 5 | { 6 | public sealed class Dump 7 | { 8 | private Dump() 9 | { 10 | } 11 | 12 | public static void Main(string[] args) 13 | { 14 | FileStream fIn = File.OpenRead(args[0]); 15 | Asn1InputStream bIn = new Asn1InputStream(fIn); 16 | 17 | Asn1Object obj; 18 | while ((obj = bIn.ReadObject()) != null) 19 | { 20 | Console.WriteLine(Asn1Dump.DumpAsString(obj)); 21 | } 22 | 23 | bIn.Close(); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/x509/CRLNumber.cs: -------------------------------------------------------------------------------- 1 | using Org.BouncyCastle.Math; 2 | 3 | namespace Org.BouncyCastle.Asn1.X509 4 | { 5 | /** 6 | * The CRLNumber object. 7 | *
 8 |      * CRLNumber::= Integer(0..MAX)
 9 |      * 
10 | */ 11 | public class CrlNumber 12 | : DerInteger 13 | { 14 | public CrlNumber( 15 | BigInteger number) 16 | : base(number) 17 | { 18 | } 19 | 20 | public BigInteger Number 21 | { 22 | get { return PositiveValue; } 23 | } 24 | 25 | public override string ToString() 26 | { 27 | return "CRLNumber: " + Number; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/x509/CertPolicyId.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Asn1.X509 2 | { 3 | /** 4 | * CertPolicyId, used in the CertificatePolicies and PolicyMappings 5 | * X509V3 Extensions. 6 | * 7 | *
 8 |      *     CertPolicyId ::= OBJECT IDENTIFIER
 9 |      * 
10 | */ 11 | public class CertPolicyID 12 | : DerObjectIdentifier 13 | { 14 | public CertPolicyID( 15 | string id) 16 | : base(id) 17 | { 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/x509/PolicyQualifierId.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Asn1.X509 2 | { 3 | /** 4 | * PolicyQualifierId, used in the CertificatePolicies 5 | * X509V3 extension. 6 | * 7 | *
 8 | 	 *    id-qt          OBJECT IDENTIFIER ::=  { id-pkix 2 }
 9 | 	 *    id-qt-cps      OBJECT IDENTIFIER ::=  { id-qt 1 }
10 | 	 *    id-qt-unotice  OBJECT IDENTIFIER ::=  { id-qt 2 }
11 | 	 *  PolicyQualifierId ::=
12 | 	 *       OBJECT IDENTIFIER ( id-qt-cps | id-qt-unotice )
13 | 	 * 
14 | */ 15 | public sealed class PolicyQualifierID : DerObjectIdentifier 16 | { 17 | private const string IdQt = "1.3.6.1.5.5.7.2"; 18 | 19 | private PolicyQualifierID( 20 | string id) 21 | : base(id) 22 | { 23 | } 24 | 25 | public static readonly PolicyQualifierID IdQtCps = new PolicyQualifierID(IdQt + ".1"); 26 | public static readonly PolicyQualifierID IdQtUnotice = new PolicyQualifierID(IdQt + ".2"); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/x509/X509Attributes.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Asn1.X509 2 | { 3 | public class X509Attributes 4 | { 5 | public static readonly DerObjectIdentifier RoleSyntax = new DerObjectIdentifier("2.5.4.72"); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/x509/qualified/ETSIQCObjectIdentifiers.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Asn1.X509.Qualified 2 | { 3 | public abstract class EtsiQCObjectIdentifiers 4 | { 5 | // 6 | // base id 7 | // 8 | public static readonly DerObjectIdentifier IdEtsiQcs = new DerObjectIdentifier("0.4.0.1862.1"); 9 | 10 | public static readonly DerObjectIdentifier IdEtsiQcsQcCompliance = new DerObjectIdentifier(IdEtsiQcs+".1"); 11 | public static readonly DerObjectIdentifier IdEtsiQcsLimitValue = new DerObjectIdentifier(IdEtsiQcs+".2"); 12 | public static readonly DerObjectIdentifier IdEtsiQcsRetentionPeriod = new DerObjectIdentifier(IdEtsiQcs+".3"); 13 | public static readonly DerObjectIdentifier IdEtsiQcsQcSscd = new DerObjectIdentifier(IdEtsiQcs+".4"); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/x509/qualified/RFC3739QCObjectIdentifiers.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Asn1.X509.Qualified 2 | { 3 | public sealed class Rfc3739QCObjectIdentifiers 4 | { 5 | private Rfc3739QCObjectIdentifiers() 6 | { 7 | } 8 | 9 | // 10 | // base id 11 | // 12 | public static readonly DerObjectIdentifier IdQcs = new DerObjectIdentifier("1.3.6.1.5.5.7.11"); 13 | 14 | public static readonly DerObjectIdentifier IdQcsPkixQCSyntaxV1 = new DerObjectIdentifier(IdQcs+".1"); 15 | public static readonly DerObjectIdentifier IdQcsPkixQCSyntaxV2 = new DerObjectIdentifier(IdQcs+".2"); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/asn1/x9/X9ECParametersHolder.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Asn1.X9 2 | { 3 | public abstract class X9ECParametersHolder 4 | { 5 | private X9ECParameters parameters; 6 | 7 | public X9ECParameters Parameters 8 | { 9 | get 10 | { 11 | if (parameters == null) 12 | { 13 | parameters = CreateParameters(); 14 | } 15 | 16 | return parameters; 17 | } 18 | } 19 | 20 | protected abstract X9ECParameters CreateParameters(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/bcpg/BcpgObject.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace Org.BouncyCastle.Bcpg 4 | { 5 | /// Base class for a PGP object. 6 | public abstract class BcpgObject 7 | { 8 | public virtual byte[] GetEncoded() 9 | { 10 | MemoryStream bOut = new MemoryStream(); 11 | BcpgOutputStream pOut = new BcpgOutputStream(bOut); 12 | 13 | pOut.WriteObject(this); 14 | 15 | return bOut.ToArray(); 16 | } 17 | 18 | public abstract void Encode(BcpgOutputStream bcpgOut); 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/bcpg/CompressedDataPacket.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Bcpg 2 | { 3 | /// Generic compressed data object. 4 | public class CompressedDataPacket 5 | : InputStreamPacket 6 | { 7 | private readonly CompressionAlgorithmTag algorithm; 8 | 9 | internal CompressedDataPacket( 10 | BcpgInputStream bcpgIn) 11 | : base(bcpgIn) 12 | { 13 | this.algorithm = (CompressionAlgorithmTag) bcpgIn.ReadByte(); 14 | } 15 | 16 | /// The algorithm tag value. 17 | public CompressionAlgorithmTag Algorithm 18 | { 19 | get { return algorithm; } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/bcpg/CompressionAlgorithmTags.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Bcpg 2 | { 3 | /// Basic tags for compression algorithms. 4 | public enum CompressionAlgorithmTag 5 | { 6 | Uncompressed = 0, // Uncompressed 7 | Zip = 1, // ZIP (RFC 1951) 8 | ZLib = 2, // ZLIB (RFC 1950) 9 | BZip2 = 3, // BZ2 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/bcpg/ContainedPacket.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace Org.BouncyCastle.Bcpg 4 | { 5 | /// Basic type for a PGP packet. 6 | public abstract class ContainedPacket 7 | : Packet 8 | { 9 | public byte[] GetEncoded() 10 | { 11 | MemoryStream bOut = new MemoryStream(); 12 | BcpgOutputStream pOut = new BcpgOutputStream(bOut); 13 | 14 | pOut.WritePacket(this); 15 | 16 | return bOut.ToArray(); 17 | } 18 | 19 | public abstract void Encode(BcpgOutputStream bcpgOut); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/bcpg/ExperimentalPacket.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Bcpg 2 | { 3 | /// Basic packet for an experimental packet. 4 | public class ExperimentalPacket 5 | : ContainedPacket //, PublicKeyAlgorithmTag 6 | { 7 | private readonly PacketTag tag; 8 | private readonly byte[] contents; 9 | 10 | internal ExperimentalPacket( 11 | PacketTag tag, 12 | BcpgInputStream bcpgIn) 13 | { 14 | this.tag = tag; 15 | 16 | this.contents = bcpgIn.ReadAll(); 17 | } 18 | 19 | public PacketTag Tag 20 | { 21 | get { return tag; } 22 | } 23 | 24 | public byte[] GetContents() 25 | { 26 | return (byte[]) contents.Clone(); 27 | } 28 | 29 | public override void Encode( 30 | BcpgOutputStream bcpgOut) 31 | { 32 | bcpgOut.WritePacket(tag, contents, true); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/bcpg/HashAlgorithmTags.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Bcpg 2 | { 3 | /// Basic tags for hash algorithms. 4 | public enum HashAlgorithmTag 5 | { 6 | MD5 = 1, // MD5 7 | Sha1 = 2, // SHA-1 8 | RipeMD160 = 3, // RIPE-MD/160 9 | DoubleSha = 4, // Reserved for double-width SHA (experimental) 10 | MD2 = 5, // MD2 11 | Tiger192 = 6, // Reserved for TIGER/192 12 | Haval5pass160 = 7, // Reserved for HAVAL (5 pass, 160-bit) 13 | 14 | Sha256 = 8, // SHA-256 15 | Sha384 = 9, // SHA-384 16 | Sha512 = 10, // SHA-512 17 | Sha224 = 11, // SHA-224 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/bcpg/IBcpgKey.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Bcpg 2 | { 3 | /// Base interface for a PGP key. 4 | public interface IBcpgKey 5 | { 6 | /// 7 | /// The base format for this key - in the case of the symmetric keys it will generally 8 | /// be raw indicating that the key is just a straight byte representation, for an asymmetric 9 | /// key the format will be PGP, indicating the key is a string of MPIs encoded in PGP format. 10 | /// 11 | /// "RAW" or "PGP". 12 | string Format { get; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/bcpg/InputStreamPacket.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Bcpg 2 | { 3 | public class InputStreamPacket 4 | : Packet 5 | { 6 | private readonly BcpgInputStream bcpgIn; 7 | 8 | public InputStreamPacket( 9 | BcpgInputStream bcpgIn) 10 | { 11 | this.bcpgIn = bcpgIn; 12 | } 13 | 14 | /// Note: you can only read from this once... 15 | public BcpgInputStream GetInputStream() 16 | { 17 | return bcpgIn; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/bcpg/MarkerPacket.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Bcpg 2 | { 3 | /// Basic type for a marker packet. 4 | public class MarkerPacket 5 | : ContainedPacket 6 | { 7 | // "PGP" 8 | byte[] marker = { (byte)0x50, (byte)0x47, (byte)0x50 }; 9 | 10 | public MarkerPacket( 11 | BcpgInputStream bcpgIn) 12 | { 13 | bcpgIn.ReadFully(marker); 14 | } 15 | 16 | public override void Encode( 17 | BcpgOutputStream bcpgOut) 18 | { 19 | bcpgOut.WritePacket(PacketTag.Marker, marker, true); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/bcpg/OutputStreamPacket.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Bcpg 4 | { 5 | public abstract class OutputStreamPacket 6 | { 7 | private readonly BcpgOutputStream bcpgOut; 8 | 9 | internal OutputStreamPacket( 10 | BcpgOutputStream bcpgOut) 11 | { 12 | if (bcpgOut == null) 13 | throw new ArgumentNullException("bcpgOut"); 14 | 15 | this.bcpgOut = bcpgOut; 16 | } 17 | 18 | public abstract BcpgOutputStream Open(); 19 | 20 | public abstract void Close(); 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/bcpg/Packet.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Bcpg 2 | { 3 | public class Packet 4 | //: PacketTag 5 | { 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/bcpg/PublicSubkeyPacket.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Bcpg 4 | { 5 | /// Basic packet for a PGP public subkey 6 | public class PublicSubkeyPacket 7 | : PublicKeyPacket 8 | { 9 | internal PublicSubkeyPacket( 10 | BcpgInputStream bcpgIn) 11 | : base(bcpgIn) 12 | { 13 | } 14 | 15 | /// Construct a version 4 public subkey packet. 16 | public PublicSubkeyPacket( 17 | PublicKeyAlgorithmTag algorithm, 18 | DateTime time, 19 | IBcpgKey key) 20 | : base(algorithm, time, key) 21 | { 22 | } 23 | 24 | public override void Encode( 25 | BcpgOutputStream bcpgOut) 26 | { 27 | bcpgOut.WritePacket(PacketTag.PublicSubkey, GetEncodedContents(), true); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/bcpg/SymmetricEncDataPacket.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Bcpg 2 | { 3 | /// Basic type for a symmetric key encrypted packet. 4 | public class SymmetricEncDataPacket 5 | : InputStreamPacket 6 | { 7 | public SymmetricEncDataPacket( 8 | BcpgInputStream bcpgIn) 9 | : base(bcpgIn) 10 | { 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/bcpg/SymmetricEncIntegrityPacket.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Bcpg 2 | { 3 | public class SymmetricEncIntegrityPacket 4 | : InputStreamPacket 5 | { 6 | internal readonly int version; 7 | 8 | internal SymmetricEncIntegrityPacket( 9 | BcpgInputStream bcpgIn) 10 | : base(bcpgIn) 11 | { 12 | version = bcpgIn.ReadByte(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/bcpg/SymmetricKeyAlgorithmTags.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Bcpg 2 | { 3 | /** 4 | * Basic tags for symmetric key algorithms 5 | */ 6 | public enum SymmetricKeyAlgorithmTag 7 | { 8 | Null = 0, // Plaintext or unencrypted data 9 | Idea = 1, // IDEA [IDEA] 10 | TripleDes = 2, // Triple-DES (DES-EDE, as per spec -168 bit key derived from 192) 11 | Cast5 = 3, // Cast5 (128 bit key, as per RFC 2144) 12 | Blowfish = 4, // Blowfish (128 bit key, 16 rounds) [Blowfish] 13 | Safer = 5, // Safer-SK128 (13 rounds) [Safer] 14 | Des = 6, // Reserved for DES/SK 15 | Aes128 = 7, // Reserved for AES with 128-bit key 16 | Aes192 = 8, // Reserved for AES with 192-bit key 17 | Aes256 = 9, // Reserved for AES with 256-bit key 18 | Twofish = 10 // Reserved for Twofish 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/bcpg/UserAttributeSubpacketTags.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Bcpg 2 | { 3 | /** 4 | * Basic PGP user attribute sub-packet tag types. 5 | */ 6 | public enum UserAttributeSubpacketTag 7 | { 8 | ImageAttribute = 1 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/bcpg/UserIdPacket.cs: -------------------------------------------------------------------------------- 1 | using System.Text; 2 | 3 | namespace Org.BouncyCastle.Bcpg 4 | { 5 | /** 6 | * Basic type for a user ID packet. 7 | */ 8 | public class UserIdPacket 9 | : ContainedPacket 10 | { 11 | private readonly byte[] idData; 12 | 13 | public UserIdPacket( 14 | BcpgInputStream bcpgIn) 15 | { 16 | this.idData = bcpgIn.ReadAll(); 17 | } 18 | 19 | public UserIdPacket( 20 | string id) 21 | { 22 | this.idData = Encoding.UTF8.GetBytes(id); 23 | } 24 | 25 | public string GetId() 26 | { 27 | return Encoding.UTF8.GetString(idData, 0, idData.Length); 28 | } 29 | 30 | public override void Encode( 31 | BcpgOutputStream bcpgOut) 32 | { 33 | bcpgOut.WritePacket(PacketTag.UserId, idData, true); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/bcpg/sig/EmbeddedSignature.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Bcpg.Sig 2 | { 3 | /** 4 | * Packet embedded signature 5 | */ 6 | public class EmbeddedSignature 7 | : SignatureSubpacket 8 | { 9 | public EmbeddedSignature( 10 | bool critical, 11 | byte[] data) 12 | : base(SignatureSubpacketTag.EmbeddedSignature, critical, data) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/cms/BaseDigestCalculator.cs: -------------------------------------------------------------------------------- 1 | using Org.BouncyCastle.Utilities; 2 | 3 | namespace Org.BouncyCastle.Cms 4 | { 5 | internal class BaseDigestCalculator 6 | : IDigestCalculator 7 | { 8 | private readonly byte[] digest; 9 | 10 | internal BaseDigestCalculator( 11 | byte[] digest) 12 | { 13 | this.digest = digest; 14 | } 15 | 16 | public byte[] GetDigest() 17 | { 18 | return Arrays.Clone(digest); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/cms/CMSAttributeTableGenerationException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Cms 4 | { 5 | public class CmsAttributeTableGenerationException 6 | : CmsException 7 | { 8 | public CmsAttributeTableGenerationException() 9 | { 10 | } 11 | 12 | public CmsAttributeTableGenerationException( 13 | string name) 14 | : base(name) 15 | { 16 | } 17 | 18 | public CmsAttributeTableGenerationException( 19 | string name, 20 | Exception e) 21 | : base(name, e) 22 | { 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/cms/CMSAttributeTableGenerator.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | 3 | using Org.BouncyCastle.Asn1.Cms; 4 | 5 | namespace Org.BouncyCastle.Cms 6 | { 7 | /// 8 | /// The 'Signature' parameter is only available when generating unsigned attributes. 9 | /// 10 | public enum CmsAttributeTableParameter 11 | { 12 | // const string ContentType = "contentType"; 13 | // const string Digest = "digest"; 14 | // const string Signature = "encryptedDigest"; 15 | // const string DigestAlgorithmIdentifier = "digestAlgID"; 16 | 17 | ContentType, Digest, Signature, DigestAlgorithmIdentifier 18 | } 19 | 20 | public interface CmsAttributeTableGenerator 21 | { 22 | AttributeTable GetAttributes(IDictionary parameters); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/cms/CMSAuthEnvelopedGenerator.cs: -------------------------------------------------------------------------------- 1 | using Org.BouncyCastle.Asn1.Nist; 2 | 3 | namespace Org.BouncyCastle.Cms 4 | { 5 | internal class CmsAuthEnvelopedGenerator 6 | { 7 | public static readonly string Aes128Ccm = NistObjectIdentifiers.IdAes128Ccm.Id; 8 | public static readonly string Aes192Ccm = NistObjectIdentifiers.IdAes192Ccm.Id; 9 | public static readonly string Aes256Ccm = NistObjectIdentifiers.IdAes256Ccm.Id; 10 | public static readonly string Aes128Gcm = NistObjectIdentifiers.IdAes128Gcm.Id; 11 | public static readonly string Aes192Gcm = NistObjectIdentifiers.IdAes192Gcm.Id; 12 | public static readonly string Aes256Gcm = NistObjectIdentifiers.IdAes256Gcm.Id; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/cms/CMSAuthenticatedGenerator.cs: -------------------------------------------------------------------------------- 1 | using Org.BouncyCastle.Security; 2 | 3 | namespace Org.BouncyCastle.Cms 4 | { 5 | public class CmsAuthenticatedGenerator 6 | : CmsEnvelopedGenerator 7 | { 8 | /** 9 | * base constructor 10 | */ 11 | public CmsAuthenticatedGenerator() 12 | { 13 | } 14 | 15 | /** 16 | * constructor allowing specific source of randomness 17 | * 18 | * @param rand instance of SecureRandom to use 19 | */ 20 | public CmsAuthenticatedGenerator( 21 | SecureRandom rand) 22 | : base(rand) 23 | { 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/cms/CMSException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Cms 4 | { 5 | public class CmsException 6 | : Exception 7 | { 8 | public CmsException() 9 | { 10 | } 11 | 12 | public CmsException( 13 | string msg) 14 | : base(msg) 15 | { 16 | } 17 | 18 | public CmsException( 19 | string msg, 20 | Exception e) 21 | : base(msg, e) 22 | { 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/cms/CMSProcessable.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace Org.BouncyCastle.Cms 4 | { 5 | public interface CmsProcessable 6 | { 7 | /// 8 | /// Generic routine to copy out the data we want processed. 9 | /// 10 | /// 11 | /// This routine may be called multiple times. 12 | /// 13 | void Write(Stream outStream); 14 | 15 | object GetContent(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/cms/CMSProcessableByteArray.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace Org.BouncyCastle.Cms 4 | { 5 | /** 6 | * a holding class for a byte array of data to be processed. 7 | */ 8 | public class CmsProcessableByteArray 9 | : CmsProcessable, CmsReadable 10 | { 11 | private readonly byte[] bytes; 12 | 13 | public CmsProcessableByteArray( 14 | byte[] bytes) 15 | { 16 | this.bytes = bytes; 17 | } 18 | 19 | public Stream GetInputStream() 20 | { 21 | return new MemoryStream(bytes, false); 22 | } 23 | 24 | public virtual void Write(Stream zOut) 25 | { 26 | zOut.Write(bytes, 0, bytes.Length); 27 | } 28 | 29 | /// A clone of the byte array 30 | public virtual object GetContent() 31 | { 32 | return bytes.Clone(); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/cms/CMSReadable.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace Org.BouncyCastle.Cms 4 | { 5 | internal interface CmsReadable 6 | { 7 | Stream GetInputStream(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/cms/CMSSecureReadable.cs: -------------------------------------------------------------------------------- 1 | using Org.BouncyCastle.Asn1.X509; 2 | using Org.BouncyCastle.Crypto.Parameters; 3 | 4 | namespace Org.BouncyCastle.Cms 5 | { 6 | internal interface CmsSecureReadable 7 | { 8 | AlgorithmIdentifier Algorithm { get; } 9 | object CryptoObject { get; } 10 | CmsReadable GetReadable(KeyParameter key); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/cms/CMSStreamException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | 4 | namespace Org.BouncyCastle.Cms 5 | { 6 | public class CmsStreamException 7 | : IOException 8 | { 9 | public CmsStreamException() 10 | { 11 | } 12 | 13 | public CmsStreamException( 14 | string name) 15 | : base(name) 16 | { 17 | } 18 | 19 | public CmsStreamException( 20 | string name, 21 | Exception e) 22 | : base(name, e) 23 | { 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/cms/CounterSignatureDigestCalculator.cs: -------------------------------------------------------------------------------- 1 | using Org.BouncyCastle.Crypto; 2 | using Org.BouncyCastle.Security; 3 | 4 | namespace Org.BouncyCastle.Cms 5 | { 6 | internal class CounterSignatureDigestCalculator 7 | : IDigestCalculator 8 | { 9 | private readonly string alg; 10 | private readonly byte[] data; 11 | 12 | internal CounterSignatureDigestCalculator( 13 | string alg, 14 | byte[] data) 15 | { 16 | this.alg = alg; 17 | this.data = data; 18 | } 19 | 20 | public byte[] GetDigest() 21 | { 22 | IDigest digest = CmsSignedHelper.Instance.GetDigestInstance(alg); 23 | return DigestUtilities.DoFinal(digest, data); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/cms/DigOutputStream.cs: -------------------------------------------------------------------------------- 1 | using Org.BouncyCastle.Crypto; 2 | using Org.BouncyCastle.Utilities.IO; 3 | 4 | namespace Org.BouncyCastle.Cms 5 | { 6 | internal class DigOutputStream 7 | : BaseOutputStream 8 | { 9 | private readonly IDigest dig; 10 | 11 | internal DigOutputStream(IDigest dig) 12 | { 13 | this.dig = dig; 14 | } 15 | 16 | public override void WriteByte(byte b) 17 | { 18 | dig.Update(b); 19 | } 20 | 21 | public override void Write(byte[] b, int off, int len) 22 | { 23 | dig.BlockUpdate(b, off, len); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/cms/IDigestCalculator.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Cms 2 | { 3 | internal interface IDigestCalculator 4 | { 5 | byte[] GetDigest(); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/cms/MacOutputStream.cs: -------------------------------------------------------------------------------- 1 | using Org.BouncyCastle.Crypto; 2 | using Org.BouncyCastle.Utilities.IO; 3 | 4 | namespace Org.BouncyCastle.Cms 5 | { 6 | internal class MacOutputStream 7 | : BaseOutputStream 8 | { 9 | private readonly IMac mac; 10 | 11 | internal MacOutputStream(IMac mac) 12 | { 13 | this.mac = mac; 14 | } 15 | 16 | public override void Write(byte[] b, int off, int len) 17 | { 18 | mac.BlockUpdate(b, off, len); 19 | } 20 | 21 | public override void WriteByte(byte b) 22 | { 23 | mac.Update(b); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/cms/NullOutputStream.cs: -------------------------------------------------------------------------------- 1 | using Org.BouncyCastle.Utilities.IO; 2 | 3 | namespace Org.BouncyCastle.Cms 4 | { 5 | internal class NullOutputStream 6 | : BaseOutputStream 7 | { 8 | public override void WriteByte(byte b) 9 | { 10 | // do nothing 11 | } 12 | 13 | public override void Write(byte[] buffer, int offset, int count) 14 | { 15 | // do nothing 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/cms/RecipientInfoGenerator.cs: -------------------------------------------------------------------------------- 1 | using Org.BouncyCastle.Asn1.Cms; 2 | using Org.BouncyCastle.Crypto.Parameters; 3 | using Org.BouncyCastle.Security; 4 | 5 | namespace Org.BouncyCastle.Cms 6 | { 7 | interface RecipientInfoGenerator 8 | { 9 | /// 10 | /// Generate a RecipientInfo object for the given key. 11 | /// 12 | /// 13 | /// A 14 | /// 15 | /// 16 | /// A 17 | /// 18 | /// 19 | /// A 20 | /// 21 | /// 22 | RecipientInfo Generate(KeyParameter contentEncryptionKey, SecureRandom random); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/cms/SigOutputStream.cs: -------------------------------------------------------------------------------- 1 | using Org.BouncyCastle.Crypto; 2 | using Org.BouncyCastle.Utilities.IO; 3 | using Org.BouncyCastle.Security; 4 | 5 | namespace Org.BouncyCastle.Cms 6 | { 7 | internal class SigOutputStream 8 | : BaseOutputStream 9 | { 10 | private readonly ISigner sig; 11 | 12 | internal SigOutputStream(ISigner sig) 13 | { 14 | this.sig = sig; 15 | } 16 | 17 | public override void WriteByte(byte b) 18 | { 19 | try 20 | { 21 | sig.Update(b); 22 | } 23 | catch (SignatureException e) 24 | { 25 | throw new CmsStreamException("signature problem: " + e); 26 | } 27 | } 28 | 29 | public override void Write(byte[] b, int off, int len) 30 | { 31 | try 32 | { 33 | sig.BlockUpdate(b, off, len); 34 | } 35 | catch (SignatureException e) 36 | { 37 | throw new CmsStreamException("signature problem: " + e); 38 | } 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/cms/SignerInfoGenerator.cs: -------------------------------------------------------------------------------- 1 | using Org.BouncyCastle.Asn1; 2 | using Org.BouncyCastle.Asn1.Cms; 3 | using Org.BouncyCastle.Asn1.X509; 4 | 5 | namespace Org.BouncyCastle.Cms 6 | { 7 | internal interface SignerInfoGenerator 8 | { 9 | SignerInfo Generate(DerObjectIdentifier contentType, AlgorithmIdentifier digestAlgorithm, 10 | byte[] calculatedDigest); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/cms/SimpleAttributeTableGenerator.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | 3 | using Org.BouncyCastle.Asn1.Cms; 4 | 5 | namespace Org.BouncyCastle.Cms 6 | { 7 | /** 8 | * Basic generator that just returns a preconstructed attribute table 9 | */ 10 | public class SimpleAttributeTableGenerator 11 | : CmsAttributeTableGenerator 12 | { 13 | private readonly AttributeTable attributes; 14 | 15 | public SimpleAttributeTableGenerator( 16 | AttributeTable attributes) 17 | { 18 | this.attributes = attributes; 19 | } 20 | 21 | public virtual AttributeTable GetAttributes( 22 | IDictionary parameters) 23 | { 24 | return attributes; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/CryptoException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Crypto 4 | { 5 | public class CryptoException 6 | : Exception 7 | { 8 | public CryptoException() 9 | { 10 | } 11 | 12 | public CryptoException( 13 | string message) 14 | : base(message) 15 | { 16 | } 17 | 18 | public CryptoException( 19 | string message, 20 | Exception exception) 21 | : base(message, exception) 22 | { 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/IAsymmetricCipherKeyPairGenerator.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Crypto 2 | { 3 | /** 4 | * interface that a public/private key pair generator should conform to. 5 | */ 6 | public interface IAsymmetricCipherKeyPairGenerator 7 | { 8 | /** 9 | * intialise the key pair generator. 10 | * 11 | * @param the parameters the key pair is to be initialised with. 12 | */ 13 | void Init(KeyGenerationParameters parameters); 14 | 15 | /** 16 | * return an AsymmetricCipherKeyPair containing the Generated keys. 17 | * 18 | * @return an AsymmetricCipherKeyPair containing the Generated keys. 19 | */ 20 | AsymmetricCipherKeyPair GenerateKeyPair(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/IBasicAgreement.cs: -------------------------------------------------------------------------------- 1 | using Org.BouncyCastle.Math; 2 | 3 | namespace Org.BouncyCastle.Crypto 4 | { 5 | /** 6 | * The basic interface that basic Diffie-Hellman implementations 7 | * conforms to. 8 | */ 9 | public interface IBasicAgreement 10 | { 11 | /** 12 | * initialise the agreement engine. 13 | */ 14 | void Init(ICipherParameters parameters); 15 | 16 | /** 17 | * given a public key from a given party calculate the next 18 | * message in the agreement sequence. 19 | */ 20 | BigInteger CalculateAgreement(ICipherParameters pubKey); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/ICipherParameters.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Crypto 2 | { 3 | /** 4 | * all parameter classes implement this. 5 | */ 6 | public interface ICipherParameters 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/IDerivationFunction.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Crypto 2 | { 3 | /** 4 | * base interface for general purpose byte derivation functions. 5 | */ 6 | public interface IDerivationFunction 7 | { 8 | void Init(IDerivationParameters parameters); 9 | 10 | /** 11 | * return the message digest used as the basis for the function 12 | */ 13 | IDigest Digest 14 | { 15 | get; 16 | } 17 | 18 | int GenerateBytes(byte[] output, int outOff, int length); 19 | //throws DataLengthException, ArgumentException; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/IDerivationParameters.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Crypto 2 | { 3 | /** 4 | * Parameters for key/byte stream derivation classes 5 | */ 6 | public interface IDerivationParameters 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/IWrapper.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Crypto 2 | { 3 | public interface IWrapper 4 | { 5 | /// The name of the algorithm this cipher implements. 6 | string AlgorithmName { get; } 7 | 8 | void Init(bool forWrapping, ICipherParameters parameters); 9 | 10 | byte[] Wrap(byte[] input, int inOff, int length); 11 | 12 | byte[] Unwrap(byte[] input, int inOff, int length); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/InvalidCipherTextException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Crypto 4 | { 5 | /** 6 | * this exception is thrown whenever we find something we don't expect in a 7 | * message. 8 | */ 9 | public class InvalidCipherTextException 10 | : CryptoException 11 | { 12 | /** 13 | * base constructor. 14 | */ 15 | public InvalidCipherTextException() 16 | { 17 | } 18 | 19 | /** 20 | * create a InvalidCipherTextException with the given message. 21 | * 22 | * @param message the message to be carried with the exception. 23 | */ 24 | public InvalidCipherTextException( 25 | string message) 26 | : base(message) 27 | { 28 | } 29 | 30 | public InvalidCipherTextException( 31 | string message, 32 | Exception exception) 33 | : base(message, exception) 34 | { 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/MaxBytesExceededException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Crypto 4 | { 5 | /// 6 | /// This exception is thrown whenever a cipher requires a change of key, iv 7 | /// or similar after x amount of bytes enciphered 8 | /// 9 | public class MaxBytesExceededException 10 | : CryptoException 11 | { 12 | public MaxBytesExceededException() 13 | { 14 | } 15 | 16 | public MaxBytesExceededException( 17 | string message) 18 | : base(message) 19 | { 20 | } 21 | 22 | public MaxBytesExceededException( 23 | string message, 24 | Exception e) 25 | : base(message, e) 26 | { 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/engines/AesWrapEngine.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Crypto.Engines 2 | { 3 | /// 4 | /// An implementation of the AES Key Wrapper from the NIST Key Wrap Specification. 5 | ///

6 | /// For further details see: http://csrc.nist.gov/encryption/kms/key-wrap.pdf. 7 | /// 8 | public class AesWrapEngine 9 | : Rfc3394WrapEngine 10 | { 11 | public AesWrapEngine() 12 | : base(new AesEngine()) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/engines/CamelliaWrapEngine.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Crypto.Engines 2 | { 3 | /// 4 | /// An implementation of the Camellia key wrapper based on RFC 3657/RFC 3394. 5 | ///

6 | /// For further details see: http://www.ietf.org/rfc/rfc3657.txt. 7 | /// 8 | public class CamelliaWrapEngine 9 | : Rfc3394WrapEngine 10 | { 11 | public CamelliaWrapEngine() 12 | : base(new CamelliaEngine()) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/engines/SEEDWrapEngine.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Crypto.Engines 2 | { 3 | /// 4 | /// An implementation of the SEED key wrapper based on RFC 4010/RFC 3394. 5 | ///

6 | /// For further details see: http://www.ietf.org/rfc/rfc4010.txt. 7 | /// 8 | public class SeedWrapEngine 9 | : Rfc3394WrapEngine 10 | { 11 | public SeedWrapEngine() 12 | : base(new SeedEngine()) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/generators/Kdf1BytesGenerator.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Crypto.Generators 2 | { 3 | /** 4 | * KFD2 generator for derived keys and ivs as defined by IEEE P1363a/ISO 18033 5 | *
6 | * This implementation is based on IEEE P1363/ISO 18033. 7 | */ 8 | public class Kdf1BytesGenerator 9 | : BaseKdfBytesGenerator 10 | { 11 | /** 12 | * Construct a KDF1 byte generator. 13 | * 14 | * @param digest the digest to be used as the source of derived keys. 15 | */ 16 | public Kdf1BytesGenerator( 17 | IDigest digest) 18 | : base(0, digest) 19 | { 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/generators/Kdf2BytesGenerator.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Crypto.Generators 2 | { 3 | /** 4 | * KFD2 generator for derived keys and ivs as defined by IEEE P1363a/ISO 18033 5 | *
6 | * This implementation is based on IEEE P1363/ISO 18033. 7 | */ 8 | public class Kdf2BytesGenerator 9 | : BaseKdfBytesGenerator 10 | { 11 | /** 12 | * Construct a KDF2 bytes generator. Generates key material 13 | * according to IEEE P1363 or ISO 18033 depending on the initialisation. 14 | * 15 | * @param digest the digest to be used as the source of derived keys. 16 | */ 17 | public Kdf2BytesGenerator( 18 | IDigest digest) 19 | : base(1, digest) 20 | { 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/modes/gcm/BasicGcmExponentiator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | using Org.BouncyCastle.Utilities; 4 | 5 | namespace Org.BouncyCastle.Crypto.Modes.Gcm 6 | { 7 | public class BasicGcmExponentiator 8 | : IGcmExponentiator 9 | { 10 | private byte[] x; 11 | 12 | public void Init(byte[] x) 13 | { 14 | this.x = Arrays.Clone(x); 15 | } 16 | 17 | public void ExponentiateX(long pow, byte[] output) 18 | { 19 | // Initial value is little-endian 1 20 | byte[] y = GcmUtilities.OneAsBytes(); 21 | 22 | if (pow > 0) 23 | { 24 | byte[] powX = Arrays.Clone(x); 25 | do 26 | { 27 | if ((pow & 1L) != 0) 28 | { 29 | GcmUtilities.Multiply(y, powX); 30 | } 31 | GcmUtilities.Multiply(powX, powX); 32 | pow >>= 1; 33 | } 34 | while (pow > 0); 35 | } 36 | 37 | Array.Copy(y, 0, output, 0, 16); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/modes/gcm/BasicGcmMultiplier.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Crypto.Modes.Gcm 2 | { 3 | public class BasicGcmMultiplier 4 | : IGcmMultiplier 5 | { 6 | private byte[] H; 7 | 8 | public void Init(byte[] H) 9 | { 10 | this.H = (byte[])H.Clone(); 11 | } 12 | 13 | public void MultiplyH(byte[] x) 14 | { 15 | GcmUtilities.Multiply(x, H); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/modes/gcm/IGcmExponentiator.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Crypto.Modes.Gcm 2 | { 3 | public interface IGcmExponentiator 4 | { 5 | void Init(byte[] x); 6 | void ExponentiateX(long pow, byte[] output); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/modes/gcm/IGcmMultiplier.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Crypto.Modes.Gcm 2 | { 3 | public interface IGcmMultiplier 4 | { 5 | void Init(byte[] H); 6 | void MultiplyH(byte[] x); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/parameters/CcmParameters.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Crypto.Parameters 2 | { 3 | public class CcmParameters 4 | : AeadParameters 5 | { 6 | /** 7 | * Base constructor. 8 | * 9 | * @param key key to be used by underlying cipher 10 | * @param macSize macSize in bits 11 | * @param nonce nonce to be used 12 | * @param associatedText associated text, if any 13 | */ 14 | public CcmParameters( 15 | KeyParameter key, 16 | int macSize, 17 | byte[] nonce, 18 | byte[] associatedText) 19 | : base(key, macSize, nonce, associatedText) 20 | { 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/parameters/DHKeyGenerationParameters.cs: -------------------------------------------------------------------------------- 1 | using Org.BouncyCastle.Security; 2 | 3 | namespace Org.BouncyCastle.Crypto.Parameters 4 | { 5 | public class DHKeyGenerationParameters 6 | : KeyGenerationParameters 7 | { 8 | private readonly DHParameters parameters; 9 | 10 | public DHKeyGenerationParameters( 11 | SecureRandom random, 12 | DHParameters parameters) 13 | : base(random, GetStrength(parameters)) 14 | { 15 | this.parameters = parameters; 16 | } 17 | 18 | public DHParameters Parameters 19 | { 20 | get { return parameters; } 21 | } 22 | 23 | internal static int GetStrength( 24 | DHParameters parameters) 25 | { 26 | return parameters.L != 0 ? parameters.L : parameters.P.BitLength; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/parameters/DsaKeyGenerationParameters.cs: -------------------------------------------------------------------------------- 1 | using Org.BouncyCastle.Security; 2 | 3 | namespace Org.BouncyCastle.Crypto.Parameters 4 | { 5 | public class DsaKeyGenerationParameters 6 | : KeyGenerationParameters 7 | { 8 | private readonly DsaParameters parameters; 9 | 10 | public DsaKeyGenerationParameters( 11 | SecureRandom random, 12 | DsaParameters parameters) 13 | : base(random, parameters.P.BitLength - 1) 14 | { 15 | this.parameters = parameters; 16 | } 17 | 18 | public DsaParameters Parameters 19 | { 20 | get { return parameters; } 21 | } 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/parameters/ElGamalKeyGenerationParameters.cs: -------------------------------------------------------------------------------- 1 | using Org.BouncyCastle.Security; 2 | 3 | namespace Org.BouncyCastle.Crypto.Parameters 4 | { 5 | public class ElGamalKeyGenerationParameters 6 | : KeyGenerationParameters 7 | { 8 | private readonly ElGamalParameters parameters; 9 | 10 | public ElGamalKeyGenerationParameters( 11 | SecureRandom random, 12 | ElGamalParameters parameters) 13 | : base(random, GetStrength(parameters)) 14 | { 15 | this.parameters = parameters; 16 | } 17 | 18 | public ElGamalParameters Parameters 19 | { 20 | get { return parameters; } 21 | } 22 | 23 | internal static int GetStrength( 24 | ElGamalParameters parameters) 25 | { 26 | return parameters.L != 0 ? parameters.L : parameters.P.BitLength; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/parameters/ISO18033KDFParameters.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Crypto.Parameters 2 | { 3 | /** 4 | * parameters for Key derivation functions for ISO-18033 5 | */ 6 | public class Iso18033KdfParameters 7 | : IDerivationParameters 8 | { 9 | byte[] seed; 10 | 11 | public Iso18033KdfParameters( 12 | byte[] seed) 13 | { 14 | this.seed = seed; 15 | } 16 | 17 | public byte[] GetSeed() 18 | { 19 | return seed; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/parameters/KdfParameters.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Crypto.Parameters 2 | { 3 | /** 4 | * parameters for Key derivation functions for IEEE P1363a 5 | */ 6 | public class KdfParameters : IDerivationParameters 7 | { 8 | byte[] iv; 9 | byte[] shared; 10 | 11 | public KdfParameters( 12 | byte[] shared, 13 | byte[] iv) 14 | { 15 | this.shared = shared; 16 | this.iv = iv; 17 | } 18 | 19 | public byte[] GetSharedSecret() 20 | { 21 | return shared; 22 | } 23 | 24 | public byte[] GetIV() 25 | { 26 | return iv; 27 | } 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/parameters/MgfParameters.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Crypto.Parameters 4 | { 5 | /// Parameters for mask derivation functions. 6 | public class MgfParameters 7 | : IDerivationParameters 8 | { 9 | private readonly byte[] seed; 10 | 11 | public MgfParameters( 12 | byte[] seed) 13 | : this(seed, 0, seed.Length) 14 | { 15 | } 16 | 17 | public MgfParameters( 18 | byte[] seed, 19 | int off, 20 | int len) 21 | { 22 | this.seed = new byte[len]; 23 | Array.Copy(seed, off, this.seed, 0, len); 24 | } 25 | 26 | public byte[] GetSeed() 27 | { 28 | return (byte[]) seed.Clone(); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/parameters/MqvPublicParameters.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Crypto.Parameters 2 | { 3 | public class MqvPublicParameters 4 | : ICipherParameters 5 | { 6 | private readonly ECPublicKeyParameters staticPublicKey; 7 | private readonly ECPublicKeyParameters ephemeralPublicKey; 8 | 9 | public MqvPublicParameters( 10 | ECPublicKeyParameters staticPublicKey, 11 | ECPublicKeyParameters ephemeralPublicKey) 12 | { 13 | this.staticPublicKey = staticPublicKey; 14 | this.ephemeralPublicKey = ephemeralPublicKey; 15 | } 16 | 17 | public ECPublicKeyParameters StaticPublicKey 18 | { 19 | get { return staticPublicKey; } 20 | } 21 | 22 | public ECPublicKeyParameters EphemeralPublicKey 23 | { 24 | get { return ephemeralPublicKey; } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/parameters/ParametersWithSBox.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Crypto.Parameters 2 | { 3 | public class ParametersWithSBox : ICipherParameters 4 | { 5 | private ICipherParameters parameters; 6 | private byte[] sBox; 7 | 8 | public ParametersWithSBox( 9 | ICipherParameters parameters, 10 | byte[] sBox) 11 | { 12 | this.parameters = parameters; 13 | this.sBox = sBox; 14 | } 15 | 16 | public byte[] GetSBox() { return sBox; } 17 | 18 | public ICipherParameters Parameters { get { return parameters; } } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/parameters/RC2Parameters.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Crypto.Parameters 2 | { 3 | public class RC2Parameters 4 | : KeyParameter 5 | { 6 | private readonly int bits; 7 | 8 | public RC2Parameters( 9 | byte[] key) 10 | : this(key, (key.Length > 128) ? 1024 : (key.Length * 8)) 11 | { 12 | } 13 | 14 | public RC2Parameters( 15 | byte[] key, 16 | int keyOff, 17 | int keyLen) 18 | : this(key, keyOff, keyLen, (keyLen > 128) ? 1024 : (keyLen * 8)) 19 | { 20 | } 21 | 22 | public RC2Parameters( 23 | byte[] key, 24 | int bits) 25 | : base(key) 26 | { 27 | this.bits = bits; 28 | } 29 | 30 | public RC2Parameters( 31 | byte[] key, 32 | int keyOff, 33 | int keyLen, 34 | int bits) 35 | : base(key, keyOff, keyLen) 36 | { 37 | this.bits = bits; 38 | } 39 | 40 | public int EffectiveKeyBits 41 | { 42 | get { return bits; } 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/parameters/RC5Parameters.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Crypto.Parameters 4 | { 5 | public class RC5Parameters 6 | : KeyParameter 7 | { 8 | private readonly int rounds; 9 | 10 | public RC5Parameters( 11 | byte[] key, 12 | int rounds) 13 | : base(key) 14 | { 15 | if (key.Length > 255) 16 | throw new ArgumentException("RC5 key length can be no greater than 255"); 17 | 18 | this.rounds = rounds; 19 | } 20 | 21 | public int Rounds 22 | { 23 | get { return rounds; } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/parameters/RSABlindingParameters.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | using Org.BouncyCastle.Math; 4 | 5 | namespace Org.BouncyCastle.Crypto.Parameters 6 | { 7 | public class RsaBlindingParameters 8 | : ICipherParameters 9 | { 10 | private readonly RsaKeyParameters publicKey; 11 | private readonly BigInteger blindingFactor; 12 | 13 | public RsaBlindingParameters( 14 | RsaKeyParameters publicKey, 15 | BigInteger blindingFactor) 16 | { 17 | if (publicKey.IsPrivate) 18 | throw new ArgumentException("RSA parameters should be for a public key"); 19 | 20 | this.publicKey = publicKey; 21 | this.blindingFactor = blindingFactor; 22 | } 23 | 24 | public RsaKeyParameters PublicKey 25 | { 26 | get { return publicKey; } 27 | } 28 | 29 | public BigInteger BlindingFactor 30 | { 31 | get { return blindingFactor; } 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/tls/AlertLevel.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Crypto.Tls 2 | { 3 | ///

4 | /// RFC 2246 7.2 5 | /// 6 | public enum AlertLevel : byte 7 | { 8 | warning = 1, 9 | fatal = 2, 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/tls/AlwaysValidVerifyer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | using Org.BouncyCastle.Asn1.X509; 4 | 5 | namespace Org.BouncyCastle.Crypto.Tls 6 | { 7 | /// 8 | /// A certificate verifyer, that will always return true. 9 | ///
10 | 	/// DO NOT USE THIS FILE UNLESS YOU KNOW EXACTLY WHAT YOU ARE DOING.
11 | 	/// 
12 | ///
13 | [Obsolete("Perform certificate verification in TlsAuthentication implementation")] 14 | public class AlwaysValidVerifyer 15 | : ICertificateVerifyer 16 | { 17 | /// Return true. 18 | public bool IsValid( 19 | X509CertificateStructure[] certs) 20 | { 21 | return true; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/tls/CertificateRequest.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | 3 | namespace Org.BouncyCastle.Crypto.Tls 4 | { 5 | public class CertificateRequest 6 | { 7 | private ClientCertificateType[] certificateTypes; 8 | private IList certificateAuthorities; 9 | 10 | public CertificateRequest(ClientCertificateType[] certificateTypes, IList certificateAuthorities) 11 | { 12 | this.certificateTypes = certificateTypes; 13 | this.certificateAuthorities = certificateAuthorities; 14 | } 15 | 16 | public ClientCertificateType[] CertificateTypes 17 | { 18 | get { return certificateTypes; } 19 | } 20 | 21 | /// A of X509Name 22 | public IList CertificateAuthorities 23 | { 24 | get { return certificateAuthorities; } 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/tls/ClientCertificateType.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Crypto.Tls 2 | { 3 | /// 4 | /// RFC 2246 7.4.4 5 | /// 6 | public enum ClientCertificateType : byte 7 | { 8 | rsa_sign = 1, 9 | dss_sign = 2, 10 | rsa_fixed_dh = 3, 11 | dss_fixed_dh = 4, 12 | 13 | /* 14 | * RFC 4492 5.5 15 | */ 16 | ecdsa_sign = 64, 17 | rsa_fixed_ecdh = 65, 18 | ecdsa_fixed_ecdh = 66, 19 | } 20 | } -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/tls/CompressionMethod.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Crypto.Tls 2 | { 3 | /// 4 | /// RFC 2246 6.1 5 | /// 6 | public enum CompressionMethod : byte 7 | { 8 | NULL = 0, 9 | 10 | /* 11 | * RFC 3749 2 12 | */ 13 | DEFLATE = 1 14 | 15 | /* 16 | * Values from 224 decimal (0xE0) through 255 decimal (0xFF) 17 | * inclusive are reserved for private use. 18 | */ 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/tls/ContentType.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Crypto.Tls 2 | { 3 | /// 4 | /// RFC 2246 6.2.1 5 | /// 6 | public enum ContentType : byte 7 | { 8 | change_cipher_spec = 20, 9 | alert = 21, 10 | handshake = 22, 11 | application_data = 23, 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/tls/DigestAlgorithm.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Crypto.Tls 2 | { 3 | public enum DigestAlgorithm 4 | { 5 | /* 6 | * Note that the values here are implementation-specific and arbitrary. 7 | * It is recommended not to depend on the particular values (e.g. serialization). 8 | */ 9 | NULL, 10 | MD5, 11 | SHA, 12 | 13 | /* 14 | * RFC 5289 15 | */ 16 | SHA256, 17 | SHA384, 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/tls/ECCurveType.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Crypto.Tls 2 | { 3 | /// 4 | /// RFC 4492 5.4 5 | /// 6 | public enum ECCurveType : byte 7 | { 8 | /** 9 | * Indicates the elliptic curve domain parameters are conveyed verbosely, and the 10 | * underlying finite field is a prime field. 11 | */ 12 | explicit_prime = 1, 13 | 14 | /** 15 | * Indicates the elliptic curve domain parameters are conveyed verbosely, and the 16 | * underlying finite field is a characteristic-2 field. 17 | */ 18 | explicit_char2 = 2, 19 | 20 | /** 21 | * Indicates that a named curve is used. This option SHOULD be used when applicable. 22 | */ 23 | named_curve = 3, 24 | 25 | /* 26 | * Values 248 through 255 are reserved for private use. 27 | */ 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/tls/ECPointFormat.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Crypto.Tls 2 | { 3 | /// 4 | /// RFC 4492 5.1.2 5 | /// 6 | public enum ECPointFormat : byte 7 | { 8 | uncompressed = 0, 9 | ansiX962_compressed_prime = 1, 10 | ansiX962_compressed_char2 = 2, 11 | 12 | /* 13 | * reserved (248..255) 14 | */ 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/tls/EncryptionAlgorithm.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Crypto.Tls 2 | { 3 | public enum EncryptionAlgorithm 4 | { 5 | /* 6 | * Note that the values here are implementation-specific and arbitrary. 7 | * It is recommended not to depend on the particular values (e.g. serialization). 8 | */ 9 | NULL, 10 | RC4_40, 11 | RC4_128, 12 | RC2_CBC_40, 13 | IDEA_CBC, 14 | DES40_CBC, 15 | DES_CBC, 16 | cls_3DES_EDE_CBC, 17 | 18 | /* 19 | * RFC 3268 20 | */ 21 | AES_128_CBC, 22 | AES_256_CBC, 23 | 24 | /* 25 | * RFC 5289 26 | */ 27 | AES_128_GCM, 28 | AES_256_GCM, 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/tls/ExtensionType.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Crypto.Tls 2 | { 3 | /// 4 | /// RFC 4366 2.3 5 | /// 6 | public enum ExtensionType : int 7 | { 8 | server_name = 0, 9 | max_fragment_length = 1, 10 | client_certificate_url = 2, 11 | trusted_ca_keys = 3, 12 | truncated_hmac = 4, 13 | status_request = 5, 14 | 15 | /* 16 | * RFC 4492 17 | */ 18 | elliptic_curves = 10, 19 | ec_point_formats = 11, 20 | 21 | /* 22 | * RFC 5054 2.8.1 23 | */ 24 | srp = 12, 25 | 26 | /* 27 | * RFC 5746 6 28 | */ 29 | renegotiation_info = 0xff01, 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/tls/HandshakeType.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Crypto.Tls 2 | { 3 | /// 4 | /// RFC 2246 7.4 5 | /// 6 | public enum HandshakeType : byte 7 | { 8 | hello_request = 0, 9 | client_hello = 1, 10 | server_hello = 2, 11 | certificate = 11, 12 | server_key_exchange = 12, 13 | certificate_request = 13, 14 | server_hello_done = 14, 15 | certificate_verify = 15, 16 | client_key_exchange = 16, 17 | finished = 20, 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/tls/ICertificateVerifyer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | using Org.BouncyCastle.Asn1.X509; 4 | 5 | namespace Org.BouncyCastle.Crypto.Tls 6 | { 7 | /// 8 | /// This should be implemented by any class which can find out, if a given 9 | /// certificate chain is being accepted by an client. 10 | /// 11 | [Obsolete("Perform certificate verification in TlsAuthentication implementation")] 12 | public interface ICertificateVerifyer 13 | { 14 | /// The certs, which are part of the chain. 15 | /// True, if the chain is accepted, false otherwise 16 | bool IsValid(X509CertificateStructure[] certs); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/tls/KeyExchangeAlgorithm.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Crypto.Tls 2 | { 3 | public enum KeyExchangeAlgorithm 4 | { 5 | /* 6 | * Note that the values here are implementation-specific and arbitrary. 7 | * It is recommended not to depend on the particular values (e.g. serialization). 8 | */ 9 | NULL, 10 | RSA, 11 | RSA_EXPORT, 12 | DHE_DSS, 13 | DHE_DSS_EXPORT, 14 | DHE_RSA, 15 | DHE_RSA_EXPORT, 16 | DH_DSS, 17 | DH_DSS_EXPORT, 18 | DH_RSA, 19 | DH_RSA_EXPORT, 20 | DH_anon, 21 | DH_anon_export, 22 | PSK, 23 | DHE_PSK, 24 | RSA_PSK, 25 | ECDH_ECDSA, 26 | ECDHE_ECDSA, 27 | ECDH_RSA, 28 | ECDHE_RSA, 29 | ECDH_anon, 30 | SRP, 31 | SRP_DSS, 32 | SRP_RSA, 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/tls/LegacyTlsAuthentication.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Crypto.Tls 4 | { 5 | /// 6 | /// A temporary class to wrap old CertificateVerifyer stuff for new TlsAuthentication. 7 | /// 8 | [Obsolete] 9 | public class LegacyTlsAuthentication 10 | : TlsAuthentication 11 | { 12 | protected ICertificateVerifyer verifyer; 13 | 14 | public LegacyTlsAuthentication(ICertificateVerifyer verifyer) 15 | { 16 | this.verifyer = verifyer; 17 | } 18 | 19 | public virtual void NotifyServerCertificate(Certificate serverCertificate) 20 | { 21 | if (!this.verifyer.IsValid(serverCertificate.GetCerts())) 22 | throw new TlsFatalAlert(AlertDescription.user_canceled); 23 | } 24 | 25 | public virtual TlsCredentials GetClientCredentials(CertificateRequest certificateRequest) 26 | { 27 | return null; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/tls/LegacyTlsClient.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Crypto.Tls 4 | { 5 | /// 6 | /// A temporary class to use LegacyTlsAuthentication 7 | /// 8 | [Obsolete] 9 | public class LegacyTlsClient 10 | : DefaultTlsClient 11 | { 12 | [Obsolete] 13 | protected ICertificateVerifyer verifyer; 14 | 15 | [Obsolete] 16 | public LegacyTlsClient(ICertificateVerifyer verifyer) 17 | { 18 | this.verifyer = verifyer; 19 | } 20 | 21 | public override TlsAuthentication GetAuthentication() 22 | { 23 | return new LegacyTlsAuthentication(verifyer); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/tls/SecurityParameters.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Crypto.Tls 2 | { 3 | public class SecurityParameters 4 | { 5 | internal byte[] clientRandom = null; 6 | internal byte[] serverRandom = null; 7 | internal byte[] masterSecret = null; 8 | 9 | public byte[] ClientRandom 10 | { 11 | get { return clientRandom; } 12 | } 13 | 14 | public byte[] ServerRandom 15 | { 16 | get { return serverRandom; } 17 | } 18 | 19 | public byte[] MasterSecret 20 | { 21 | get { return masterSecret; } 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/tls/TlsAgreementCredentials.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace Org.BouncyCastle.Crypto.Tls 4 | { 5 | public interface TlsAgreementCredentials : TlsCredentials 6 | { 7 | /// 8 | byte[] GenerateAgreement(AsymmetricKeyParameter serverPublicKey); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/tls/TlsCipher.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace Org.BouncyCastle.Crypto.Tls 4 | { 5 | public interface TlsCipher 6 | { 7 | /// 8 | byte[] EncodePlaintext(ContentType type, byte[] plaintext, int offset, int len); 9 | 10 | /// 11 | byte[] DecodeCiphertext(ContentType type, byte[] ciphertext, int offset, int len); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/tls/TlsCipherFactory.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace Org.BouncyCastle.Crypto.Tls 4 | { 5 | public interface TlsCipherFactory 6 | { 7 | /// 8 | TlsCipher CreateCipher(TlsClientContext context, EncryptionAlgorithm encryptionAlgorithm, 9 | DigestAlgorithm digestAlgorithm); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/tls/TlsClientContext.cs: -------------------------------------------------------------------------------- 1 | using Org.BouncyCastle.Security; 2 | 3 | namespace Org.BouncyCastle.Crypto.Tls 4 | { 5 | public interface TlsClientContext 6 | { 7 | SecureRandom SecureRandom { get; } 8 | 9 | SecurityParameters SecurityParameters { get; } 10 | 11 | object UserObject { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/tls/TlsClientContextImpl.cs: -------------------------------------------------------------------------------- 1 | using Org.BouncyCastle.Security; 2 | 3 | namespace Org.BouncyCastle.Crypto.Tls 4 | { 5 | internal class TlsClientContextImpl 6 | : TlsClientContext 7 | { 8 | private readonly SecureRandom secureRandom; 9 | private readonly SecurityParameters securityParameters; 10 | 11 | private object userObject = null; 12 | 13 | internal TlsClientContextImpl(SecureRandom secureRandom, SecurityParameters securityParameters) 14 | { 15 | this.secureRandom = secureRandom; 16 | this.securityParameters = securityParameters; 17 | } 18 | 19 | public virtual SecureRandom SecureRandom 20 | { 21 | get { return secureRandom; } 22 | } 23 | 24 | public virtual SecurityParameters SecurityParameters 25 | { 26 | get { return securityParameters; } 27 | } 28 | 29 | public virtual object UserObject 30 | { 31 | get { return userObject; } 32 | set { this.userObject = value; } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/tls/TlsCompression.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace Org.BouncyCastle.Crypto.Tls 4 | { 5 | public interface TlsCompression 6 | { 7 | Stream Compress(Stream output); 8 | 9 | Stream Decompress(Stream output); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/tls/TlsCredentials.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Crypto.Tls 2 | { 3 | public interface TlsCredentials 4 | { 5 | Certificate Certificate { get; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/tls/TlsDssSigner.cs: -------------------------------------------------------------------------------- 1 | using Org.BouncyCastle.Crypto.Parameters; 2 | using Org.BouncyCastle.Crypto.Signers; 3 | 4 | namespace Org.BouncyCastle.Crypto.Tls 5 | { 6 | internal class TlsDssSigner 7 | : TlsDsaSigner 8 | { 9 | public override bool IsValidPublicKey(AsymmetricKeyParameter publicKey) 10 | { 11 | return publicKey is DsaPublicKeyParameters; 12 | } 13 | 14 | protected override IDsa CreateDsaImpl() 15 | { 16 | return new DsaSigner(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/tls/TlsECDsaSigner.cs: -------------------------------------------------------------------------------- 1 | using Org.BouncyCastle.Crypto.Parameters; 2 | using Org.BouncyCastle.Crypto.Signers; 3 | 4 | namespace Org.BouncyCastle.Crypto.Tls 5 | { 6 | internal class TlsECDsaSigner 7 | : TlsDsaSigner 8 | { 9 | public override bool IsValidPublicKey(AsymmetricKeyParameter publicKey) 10 | { 11 | return publicKey is ECPublicKeyParameters; 12 | } 13 | 14 | protected override IDsa CreateDsaImpl() 15 | { 16 | return new ECDsaSigner(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/tls/TlsException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Crypto.Tls 4 | { 5 | public class TlsException : Exception 6 | { 7 | public TlsException() : base() { } 8 | public TlsException(string message) : base(message) { } 9 | public TlsException(string message, Exception exception) : base(message, exception) { } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/tls/TlsFatalAlert.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace Org.BouncyCastle.Crypto.Tls 4 | { 5 | public class TlsFatalAlert 6 | : IOException 7 | { 8 | private readonly AlertDescription alertDescription; 9 | 10 | public TlsFatalAlert(AlertDescription alertDescription) 11 | { 12 | this.alertDescription = alertDescription; 13 | } 14 | 15 | public AlertDescription AlertDescription 16 | { 17 | get { return alertDescription; } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/tls/TlsNullCipher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Crypto.Tls 4 | { 5 | /// 6 | /// A NULL cipher suite, for use during handshake. 7 | /// 8 | public class TlsNullCipher 9 | : TlsCipher 10 | { 11 | public virtual byte[] EncodePlaintext(ContentType type, byte[] plaintext, int offset, int len) 12 | { 13 | return CopyData(plaintext, offset, len); 14 | } 15 | 16 | public virtual byte[] DecodeCiphertext(ContentType type, byte[] ciphertext, int offset, int len) 17 | { 18 | return CopyData(ciphertext, offset, len); 19 | } 20 | 21 | protected virtual byte[] CopyData(byte[] text, int offset, int len) 22 | { 23 | byte[] result = new byte[len]; 24 | Array.Copy(text, offset, result, 0, len); 25 | return result; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/tls/TlsNullCompression.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace Org.BouncyCastle.Crypto.Tls 4 | { 5 | public class TlsNullCompression 6 | : TlsCompression 7 | { 8 | public virtual Stream Compress(Stream output) 9 | { 10 | return output; 11 | } 12 | 13 | public virtual Stream Decompress(Stream output) 14 | { 15 | return output; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/tls/TlsSigner.cs: -------------------------------------------------------------------------------- 1 | using Org.BouncyCastle.Security; 2 | 3 | namespace Org.BouncyCastle.Crypto.Tls 4 | { 5 | public interface TlsSigner 6 | { 7 | byte[] CalculateRawSignature(SecureRandom random, AsymmetricKeyParameter privateKey, 8 | byte[] md5andsha1); 9 | bool VerifyRawSignature(byte[] sigBytes, AsymmetricKeyParameter publicKey, byte[] md5andsha1); 10 | 11 | ISigner CreateSigner(SecureRandom random, AsymmetricKeyParameter privateKey); 12 | ISigner CreateVerifyer(AsymmetricKeyParameter publicKey); 13 | 14 | bool IsValidPublicKey(AsymmetricKeyParameter publicKey); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/crypto/tls/TlsSignerCredentials.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace Org.BouncyCastle.Crypto.Tls 4 | { 5 | public interface TlsSignerCredentials : TlsCredentials 6 | { 7 | /// 8 | byte[] GenerateCertificateSignature(byte[] md5andsha1); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/math/ec/multiplier/ECMultiplier.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Math.EC.Multiplier 2 | { 3 | /** 4 | * Interface for classes encapsulating a point multiplication algorithm 5 | * for ECPoints. 6 | */ 7 | internal interface ECMultiplier 8 | { 9 | /** 10 | * Multiplies the ECPoint p by k, i.e. 11 | * p is added k times to itself. 12 | * @param p The ECPoint to be multiplied. 13 | * @param k The factor by which p i multiplied. 14 | * @return p multiplied by k. 15 | */ 16 | ECPoint Multiply(ECPoint p, BigInteger k, PreCompInfo preCompInfo); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/math/ec/multiplier/PreCompInfo.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Math.EC.Multiplier 2 | { 3 | /** 4 | * Interface for classes storing precomputation data for multiplication 5 | * algorithms. Used as a Memento (see GOF patterns) for 6 | * WNafMultiplier. 7 | */ 8 | internal interface PreCompInfo 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/math/ec/multiplier/ReferenceMultiplier.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Math.EC.Multiplier 2 | { 3 | internal class ReferenceMultiplier 4 | : ECMultiplier 5 | { 6 | /** 7 | * Simple shift-and-add multiplication. Serves as reference implementation 8 | * to verify (possibly faster) implementations in 9 | * {@link org.bouncycastle.math.ec.ECPoint ECPoint}. 10 | * 11 | * @param p The point to multiply. 12 | * @param k The factor by which to multiply. 13 | * @return The result of the point multiplication k * p. 14 | */ 15 | public ECPoint Multiply(ECPoint p, BigInteger k, PreCompInfo preCompInfo) 16 | { 17 | ECPoint q = p.Curve.Infinity; 18 | int t = k.BitLength; 19 | for (int i = 0; i < t; i++) 20 | { 21 | if (k.TestBit(i)) 22 | { 23 | q = q.Add(p); 24 | } 25 | p = p.Twice(); 26 | } 27 | return q; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/ocsp/CertificateStatus.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Ocsp 2 | { 3 | public abstract class CertificateStatus 4 | { 5 | public static readonly CertificateStatus Good = null; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/ocsp/OCSPException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Ocsp 4 | { 5 | public class OcspException 6 | : Exception 7 | { 8 | public OcspException() 9 | { 10 | } 11 | 12 | public OcspException( 13 | string message) 14 | : base(message) 15 | { 16 | } 17 | 18 | public OcspException( 19 | string message, 20 | Exception e) 21 | : base(message, e) 22 | { 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/ocsp/OCSPRespStatus.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Ocsp 4 | { 5 | [Obsolete("Use version with correct spelling 'OcspRespStatus'")] 6 | public abstract class OcscpRespStatus : OcspRespStatus 7 | { 8 | } 9 | 10 | public abstract class OcspRespStatus 11 | { 12 | /** 13 | * note 4 is not used. 14 | */ 15 | public const int Successful = 0; // --Response has valid confirmations 16 | public const int MalformedRequest = 1; // --Illegal confirmation request 17 | public const int InternalError = 2; // --Internal error in issuer 18 | public const int TryLater = 3; // --Try again later 19 | public const int SigRequired = 5; // --Must sign the request 20 | public const int Unauthorized = 6; // --Request unauthorized 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/ocsp/Req.cs: -------------------------------------------------------------------------------- 1 | using Org.BouncyCastle.Asn1.Ocsp; 2 | using Org.BouncyCastle.Asn1.X509; 3 | using Org.BouncyCastle.X509; 4 | 5 | namespace Org.BouncyCastle.Ocsp 6 | { 7 | public class Req 8 | : X509ExtensionBase 9 | { 10 | private Request req; 11 | 12 | public Req( 13 | Request req) 14 | { 15 | this.req = req; 16 | } 17 | 18 | public CertificateID GetCertID() 19 | { 20 | return new CertificateID(req.ReqCert); 21 | } 22 | 23 | public X509Extensions SingleRequestExtensions 24 | { 25 | get { return req.SingleRequestExtensions; } 26 | } 27 | 28 | protected override X509Extensions GetX509Extensions() 29 | { 30 | return SingleRequestExtensions; 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/ocsp/UnknownStatus.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Ocsp 2 | { 3 | /** 4 | * wrapper for the UnknownInfo object 5 | */ 6 | public class UnknownStatus 7 | : CertificateStatus 8 | { 9 | public UnknownStatus() 10 | { 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/openpgp/IStreamGenerator.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Bcpg.OpenPgp 2 | { 3 | public interface IStreamGenerator 4 | { 5 | void Close(); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/openpgp/PGPObject.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Bcpg.OpenPgp 2 | { 3 | public abstract class PgpObject 4 | { 5 | internal PgpObject() 6 | { 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/openpgp/PgpDataValidationException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Bcpg.OpenPgp 4 | { 5 | /// 6 | /// Thrown if the IV at the start of a data stream indicates the wrong key is being used. 7 | /// 8 | public class PgpDataValidationException 9 | : PgpException 10 | { 11 | public PgpDataValidationException() : base() {} 12 | public PgpDataValidationException(string message) : base(message) {} 13 | public PgpDataValidationException(string message, Exception exception) : base(message, exception) {} 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/openpgp/PgpException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Bcpg.OpenPgp 4 | { 5 | /// Generic exception class for PGP encoding/decoding problems. 6 | public class PgpException 7 | : Exception 8 | { 9 | public PgpException() : base() {} 10 | public PgpException(string message) : base(message) {} 11 | public PgpException(string message, Exception exception) : base(message, exception) {} 12 | 13 | [Obsolete("Use InnerException property")] 14 | public Exception UnderlyingException 15 | { 16 | get { return InnerException; } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/openpgp/PgpExperimental.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Bcpg.OpenPgp 2 | { 3 | public class PgpExperimental 4 | : PgpObject 5 | { 6 | private readonly ExperimentalPacket p; 7 | 8 | public PgpExperimental( 9 | BcpgInputStream bcpgIn) 10 | { 11 | p = (ExperimentalPacket) bcpgIn.ReadPacket(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/openpgp/PgpKeyFlags.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Bcpg.OpenPgp 2 | { 3 | /// Key flag values for the KeyFlags subpacket. 4 | public abstract class PgpKeyFlags 5 | { 6 | public const int CanCertify = 0x01; // This key may be used to certify other keys. 7 | public const int CanSign = 0x02; // This key may be used to sign data. 8 | public const int CanEncryptCommunications = 0x04; // This key may be used to encrypt communications. 9 | public const int CanEncryptStorage = 0x08; // This key may be used to encrypt storage. 10 | public const int MaybeSplit = 0x10; // The private component of this key may have been split by a secret-sharing mechanism. 11 | public const int MaybeShared = 0x80; // The private component of this key may be in the possession of more than one person. 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/openpgp/PgpKeyValidationException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Bcpg.OpenPgp 4 | { 5 | /// 6 | /// Thrown if the key checksum is invalid. 7 | /// 8 | public class PgpKeyValidationException 9 | : PgpException 10 | { 11 | public PgpKeyValidationException() : base() {} 12 | public PgpKeyValidationException(string message) : base(message) {} 13 | public PgpKeyValidationException(string message, Exception exception) : base(message, exception) {} 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/openpgp/PgpMarker.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Bcpg.OpenPgp 2 | { 3 | /// 4 | /// A PGP marker packet - in general these should be ignored other than where 5 | /// the idea is to preserve the original input stream. 6 | /// 7 | public class PgpMarker 8 | : PgpObject 9 | { 10 | private readonly MarkerPacket p; 11 | 12 | public PgpMarker( 13 | BcpgInputStream bcpgIn) 14 | { 15 | p = (MarkerPacket) bcpgIn.ReadPacket(); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/openpgp/WrappedGeneratorStream.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | using Org.BouncyCastle.Asn1.Utilities; 4 | 5 | namespace Org.BouncyCastle.Bcpg.OpenPgp 6 | { 7 | public class WrappedGeneratorStream 8 | : FilterStream 9 | { 10 | private readonly IStreamGenerator gen; 11 | 12 | public WrappedGeneratorStream( 13 | IStreamGenerator gen, 14 | Stream str) 15 | : base(str) 16 | { 17 | this.gen = gen; 18 | } 19 | 20 | public override void Close() 21 | { 22 | gen.Close(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/openssl/EncryptionException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | 4 | namespace Org.BouncyCastle.Security 5 | { 6 | public class EncryptionException 7 | : IOException 8 | { 9 | public EncryptionException( 10 | string message) 11 | : base(message) 12 | { 13 | } 14 | 15 | public EncryptionException( 16 | string message, 17 | Exception exception) 18 | : base(message, exception) 19 | { 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/openssl/IPasswordFinder.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.OpenSsl 2 | { 3 | public interface IPasswordFinder 4 | { 5 | char[] GetPassword(); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/openssl/PEMException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | 4 | namespace Org.BouncyCastle.OpenSsl 5 | { 6 | public class PemException 7 | : IOException 8 | { 9 | public PemException( 10 | string message) 11 | : base(message) 12 | { 13 | } 14 | 15 | public PemException( 16 | string message, 17 | Exception exception) 18 | : base(message, exception) 19 | { 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/openssl/PasswordException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | 4 | namespace Org.BouncyCastle.Security 5 | { 6 | public class PasswordException 7 | : IOException 8 | { 9 | public PasswordException( 10 | string message) 11 | : base(message) 12 | { 13 | } 14 | 15 | public PasswordException( 16 | string message, 17 | Exception exception) 18 | : base(message, exception) 19 | { 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/pkix/CertStatus.cs: -------------------------------------------------------------------------------- 1 | using Org.BouncyCastle.Utilities.Date; 2 | 3 | namespace Org.BouncyCastle.Pkix 4 | { 5 | public class CertStatus 6 | { 7 | public const int Unrevoked = 11; 8 | 9 | public const int Undetermined = 12; 10 | 11 | private int status = Unrevoked; 12 | 13 | DateTimeObject revocationDate = null; 14 | 15 | /// 16 | /// Returns the revocationDate. 17 | /// 18 | public DateTimeObject RevocationDate 19 | { 20 | get { return revocationDate; } 21 | set { this.revocationDate = value; } 22 | } 23 | 24 | /// 25 | /// Returns the certStatus. 26 | /// 27 | public int Status 28 | { 29 | get { return status; } 30 | set { this.status = value; } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/pkix/PkixCertPathBuilderException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | using Org.BouncyCastle.Security; 4 | 5 | namespace Org.BouncyCastle.Pkix 6 | { 7 | /// 8 | /// Summary description for PkixCertPathBuilderException. 9 | /// 10 | public class PkixCertPathBuilderException : GeneralSecurityException 11 | { 12 | public PkixCertPathBuilderException() : base() { } 13 | 14 | public PkixCertPathBuilderException(string message) : base(message) { } 15 | 16 | public PkixCertPathBuilderException(string message, Exception exception) : base(message, exception) { } 17 | 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/pkix/PkixNameConstraintValidatorException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Pkix 4 | { 5 | public class PkixNameConstraintValidatorException : Exception 6 | { 7 | public PkixNameConstraintValidatorException(String msg) 8 | : base(msg) 9 | { 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/security/GeneralSecurityException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Security 4 | { 5 | public class GeneralSecurityException 6 | : Exception 7 | { 8 | public GeneralSecurityException() 9 | : base() 10 | { 11 | } 12 | 13 | public GeneralSecurityException( 14 | string message) 15 | : base(message) 16 | { 17 | } 18 | 19 | public GeneralSecurityException( 20 | string message, 21 | Exception exception) 22 | : base(message, exception) 23 | { 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/security/InvalidKeyException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Security 4 | { 5 | public class InvalidKeyException : KeyException 6 | { 7 | public InvalidKeyException() : base() { } 8 | public InvalidKeyException(string message) : base(message) { } 9 | public InvalidKeyException(string message, Exception exception) : base(message, exception) { } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/security/InvalidParameterException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Security 4 | { 5 | public class InvalidParameterException : KeyException 6 | { 7 | public InvalidParameterException() : base() { } 8 | public InvalidParameterException(string message) : base(message) { } 9 | public InvalidParameterException(string message, Exception exception) : base(message, exception) { } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/security/KeyException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Security 4 | { 5 | public class KeyException : GeneralSecurityException 6 | { 7 | public KeyException() : base() { } 8 | public KeyException(string message) : base(message) { } 9 | public KeyException(string message, Exception exception) : base(message, exception) { } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/security/NoSuchAlgorithmException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Security 4 | { 5 | [Obsolete("Never thrown")] 6 | public class NoSuchAlgorithmException : GeneralSecurityException 7 | { 8 | public NoSuchAlgorithmException() : base() {} 9 | public NoSuchAlgorithmException(string message) : base(message) {} 10 | public NoSuchAlgorithmException(string message, Exception exception) : base(message, exception) {} 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/security/SecurityUtilityException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Security 4 | { 5 | public class SecurityUtilityException 6 | : Exception 7 | { 8 | /** 9 | * base constructor. 10 | */ 11 | public SecurityUtilityException() 12 | { 13 | } 14 | 15 | /** 16 | * create a SecurityUtilityException with the given message. 17 | * 18 | * @param message the message to be carried with the exception. 19 | */ 20 | public SecurityUtilityException( 21 | string message) 22 | : base(message) 23 | { 24 | } 25 | 26 | public SecurityUtilityException( 27 | string message, 28 | Exception exception) 29 | : base(message, exception) 30 | { 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/security/SignatureException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Security 4 | { 5 | public class SignatureException : GeneralSecurityException 6 | { 7 | public SignatureException() : base() { } 8 | public SignatureException(string message) : base(message) { } 9 | public SignatureException(string message, Exception exception) : base(message, exception) { } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/security/cert/CertificateEncodingException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Security.Certificates 4 | { 5 | public class CertificateEncodingException : CertificateException 6 | { 7 | public CertificateEncodingException() : base() { } 8 | public CertificateEncodingException(string msg) : base(msg) { } 9 | public CertificateEncodingException(string msg, Exception e) : base(msg, e) { } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/security/cert/CertificateException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Security.Certificates 4 | { 5 | public class CertificateException : GeneralSecurityException 6 | { 7 | public CertificateException() : base() { } 8 | public CertificateException(string message) : base(message) { } 9 | public CertificateException(string message, Exception exception) : base(message, exception) { } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/security/cert/CertificateExpiredException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Security.Certificates 4 | { 5 | public class CertificateExpiredException : CertificateException 6 | { 7 | public CertificateExpiredException() : base() { } 8 | public CertificateExpiredException(string message) : base(message) { } 9 | public CertificateExpiredException(string message, Exception exception) : base(message, exception) { } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/security/cert/CertificateNotYetValidException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Security.Certificates 4 | { 5 | public class CertificateNotYetValidException : CertificateException 6 | { 7 | public CertificateNotYetValidException() : base() { } 8 | public CertificateNotYetValidException(string message) : base(message) { } 9 | public CertificateNotYetValidException(string message, Exception exception) : base(message, exception) { } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/security/cert/CertificateParsingException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Security.Certificates 4 | { 5 | public class CertificateParsingException : CertificateException 6 | { 7 | public CertificateParsingException() : base() { } 8 | public CertificateParsingException(string message) : base(message) { } 9 | public CertificateParsingException(string message, Exception exception) : base(message, exception) { } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/security/cert/CrlException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Security.Certificates 4 | { 5 | public class CrlException : GeneralSecurityException 6 | { 7 | public CrlException() : base() { } 8 | public CrlException(string msg) : base(msg) {} 9 | public CrlException(string msg, Exception e) : base(msg, e) {} 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/tsp/GenTimeAccuracy.cs: -------------------------------------------------------------------------------- 1 | using Org.BouncyCastle.Asn1; 2 | using Org.BouncyCastle.Asn1.Tsp; 3 | 4 | namespace Org.BouncyCastle.Tsp 5 | { 6 | public class GenTimeAccuracy 7 | { 8 | private Accuracy accuracy; 9 | 10 | public GenTimeAccuracy( 11 | Accuracy accuracy) 12 | { 13 | this.accuracy = accuracy; 14 | } 15 | 16 | public int Seconds { get { return GetTimeComponent(accuracy.Seconds); } } 17 | 18 | public int Millis { get { return GetTimeComponent(accuracy.Millis); } } 19 | 20 | public int Micros { get { return GetTimeComponent(accuracy.Micros); } } 21 | 22 | private int GetTimeComponent( 23 | DerInteger time) 24 | { 25 | return time == null ? 0 : time.Value.IntValue; 26 | } 27 | 28 | public override string ToString() 29 | { 30 | return Seconds + "." + Millis.ToString("000") + Micros.ToString("000"); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/tsp/TSPException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Tsp 4 | { 5 | public class TspException 6 | : Exception 7 | { 8 | public TspException() 9 | { 10 | } 11 | 12 | public TspException( 13 | string message) 14 | : base(message) 15 | { 16 | } 17 | 18 | public TspException( 19 | string message, 20 | Exception e) 21 | : base(message, e) 22 | { 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/util/collections/EmptyEnumerable.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | 4 | namespace Org.BouncyCastle.Utilities.Collections 5 | { 6 | public sealed class EmptyEnumerable 7 | : IEnumerable 8 | { 9 | public static readonly IEnumerable Instance = new EmptyEnumerable(); 10 | 11 | private EmptyEnumerable() 12 | { 13 | } 14 | 15 | public IEnumerator GetEnumerator() 16 | { 17 | return EmptyEnumerator.Instance; 18 | } 19 | } 20 | 21 | public sealed class EmptyEnumerator 22 | : IEnumerator 23 | { 24 | public static readonly IEnumerator Instance = new EmptyEnumerator(); 25 | 26 | private EmptyEnumerator() 27 | { 28 | } 29 | 30 | public bool MoveNext() 31 | { 32 | return false; 33 | } 34 | 35 | public void Reset() 36 | { 37 | } 38 | 39 | public object Current 40 | { 41 | get { throw new InvalidOperationException("No elements"); } 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/util/collections/EnumerableProxy.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | 4 | namespace Org.BouncyCastle.Utilities.Collections 5 | { 6 | public sealed class EnumerableProxy 7 | : IEnumerable 8 | { 9 | private readonly IEnumerable inner; 10 | 11 | public EnumerableProxy( 12 | IEnumerable inner) 13 | { 14 | if (inner == null) 15 | throw new ArgumentNullException("inner"); 16 | 17 | this.inner = inner; 18 | } 19 | 20 | public IEnumerator GetEnumerator() 21 | { 22 | return inner.GetEnumerator(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/util/collections/ISet.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | 3 | namespace Org.BouncyCastle.Utilities.Collections 4 | { 5 | public interface ISet 6 | : ICollection 7 | { 8 | void Add(object o); 9 | void AddAll(IEnumerable e); 10 | void Clear(); 11 | bool Contains(object o); 12 | bool IsEmpty { get; } 13 | bool IsFixedSize { get; } 14 | bool IsReadOnly { get; } 15 | void Remove(object o); 16 | void RemoveAll(IEnumerable e); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/util/date/DateTimeObject.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Utilities.Date 4 | { 5 | public sealed class DateTimeObject 6 | { 7 | private readonly DateTime dt; 8 | 9 | public DateTimeObject( 10 | DateTime dt) 11 | { 12 | this.dt = dt; 13 | } 14 | 15 | public DateTime Value 16 | { 17 | get { return dt; } 18 | } 19 | 20 | public override string ToString() 21 | { 22 | return dt.ToString(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/util/encoders/IEncoder.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace Org.BouncyCastle.Utilities.Encoders 4 | { 5 | /** 6 | * Encode and decode byte arrays (typically from binary to 7-bit ASCII 7 | * encodings). 8 | */ 9 | public interface IEncoder 10 | { 11 | int Encode(byte[] data, int off, int length, Stream outStream); 12 | 13 | int Decode(byte[] data, int off, int length, Stream outStream); 14 | 15 | int DecodeString(string data, Stream outStream); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/util/encoders/Translator.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Utilities.Encoders 2 | { 3 | /// 4 | /// Translator interface. 5 | /// 6 | public interface ITranslator 7 | { 8 | int GetEncodedBlockSize(); 9 | 10 | int Encode(byte[] input, int inOff, int length, byte[] outBytes, int outOff); 11 | 12 | int GetDecodedBlockSize(); 13 | 14 | int Decode(byte[] input, int inOff, int length, byte[] outBytes, int outOff); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/util/io/StreamOverflowException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | 4 | namespace Org.BouncyCastle.Utilities.IO 5 | { 6 | public class StreamOverflowException 7 | : IOException 8 | { 9 | public StreamOverflowException() 10 | : base() 11 | { 12 | } 13 | 14 | public StreamOverflowException( 15 | string message) 16 | : base(message) 17 | { 18 | } 19 | 20 | public StreamOverflowException( 21 | string message, 22 | Exception exception) 23 | : base(message, exception) 24 | { 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/util/io/TeeOutputStream.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | using System.IO; 3 | 4 | namespace Org.BouncyCastle.Utilities.IO 5 | { 6 | public class TeeOutputStream 7 | : BaseOutputStream 8 | { 9 | private readonly Stream output, tee; 10 | 11 | public TeeOutputStream(Stream output, Stream tee) 12 | { 13 | Debug.Assert(output.CanWrite); 14 | Debug.Assert(tee.CanWrite); 15 | 16 | this.output = output; 17 | this.tee = tee; 18 | } 19 | 20 | public override void Close() 21 | { 22 | output.Close(); 23 | tee.Close(); 24 | } 25 | 26 | public override void Write(byte[] buffer, int offset, int count) 27 | { 28 | output.Write(buffer, offset, count); 29 | tee.Write(buffer, offset, count); 30 | } 31 | 32 | public override void WriteByte(byte b) 33 | { 34 | output.WriteByte(b); 35 | tee.WriteByte(b); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/util/io/pem/PemGenerationException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.Utilities.IO.Pem 4 | { 5 | public class PemGenerationException 6 | : Exception 7 | { 8 | public PemGenerationException() 9 | : base() 10 | { 11 | } 12 | 13 | public PemGenerationException( 14 | string message) 15 | : base(message) 16 | { 17 | } 18 | 19 | public PemGenerationException( 20 | string message, 21 | Exception exception) 22 | : base(message, exception) 23 | { 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/util/io/pem/PemObjectGenerator.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.Utilities.IO.Pem 2 | { 3 | public interface PemObjectGenerator 4 | { 5 | /// 6 | /// A 7 | /// 8 | /// 9 | PemObject Generate(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/util/io/pem/PemObjectParser.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace Org.BouncyCastle.Utilities.IO.Pem 4 | { 5 | public interface PemObjectParser 6 | { 7 | /// 8 | /// A 9 | /// 10 | /// 11 | /// A 12 | /// 13 | /// 14 | object ParseObject(PemObject obj); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/x509/IX509Extension.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | using Org.BouncyCastle.Asn1; 4 | using Org.BouncyCastle.Utilities.Collections; 5 | 6 | namespace Org.BouncyCastle.X509 7 | { 8 | public interface IX509Extension 9 | { 10 | /// 11 | /// Get all critical extension values, by oid 12 | /// 13 | /// IDictionary with string (OID) keys and Asn1OctetString values 14 | ISet GetCriticalExtensionOids(); 15 | 16 | /// 17 | /// Get all non-critical extension values, by oid 18 | /// 19 | /// IDictionary with string (OID) keys and Asn1OctetString values 20 | ISet GetNonCriticalExtensionOids(); 21 | 22 | [Obsolete("Use version taking a DerObjectIdentifier instead")] 23 | Asn1OctetString GetExtensionValue(string oid); 24 | 25 | Asn1OctetString GetExtensionValue(DerObjectIdentifier oid); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/x509/store/IX509Selector.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.X509.Store 4 | { 5 | public interface IX509Selector 6 | #if !SILVERLIGHT 7 | : ICloneable 8 | #endif 9 | { 10 | #if SILVERLIGHT 11 | object Clone(); 12 | #endif 13 | bool Match(object obj); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/x509/store/IX509Store.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | 3 | namespace Org.BouncyCastle.X509.Store 4 | { 5 | public interface IX509Store 6 | { 7 | // void Init(IX509StoreParameters parameters); 8 | ICollection GetMatches(IX509Selector selector); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/x509/store/IX509StoreParameters.cs: -------------------------------------------------------------------------------- 1 | namespace Org.BouncyCastle.X509.Store 2 | { 3 | public interface IX509StoreParameters 4 | { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/x509/store/NoSuchStoreException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.X509.Store 4 | { 5 | public class NoSuchStoreException 6 | : X509StoreException 7 | { 8 | public NoSuchStoreException() 9 | { 10 | } 11 | 12 | public NoSuchStoreException( 13 | string message) 14 | : base(message) 15 | { 16 | } 17 | 18 | public NoSuchStoreException( 19 | string message, 20 | Exception e) 21 | : base(message, e) 22 | { 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/BouncyCastle/x509/store/X509StoreException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Org.BouncyCastle.X509.Store 4 | { 5 | public class X509StoreException 6 | : Exception 7 | { 8 | public X509StoreException() 9 | { 10 | } 11 | 12 | public X509StoreException( 13 | string message) 14 | : base(message) 15 | { 16 | } 17 | 18 | public X509StoreException( 19 | string message, 20 | Exception e) 21 | : base(message, e) 22 | { 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/Core/Attributes/CmdletDescriptionAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Sorlov.PowerShell.Lib.Core.Attributes 4 | { 5 | public class CmdletDescriptionAttribute : Attribute 6 | { 7 | public string Description { get; set; } 8 | 9 | public string Synopsis { get; set; } 10 | 11 | public CmdletDescriptionAttribute(string desc) 12 | { 13 | Description = desc; 14 | Synopsis = desc; 15 | } 16 | 17 | public CmdletDescriptionAttribute(string synopsis, string desc) 18 | { 19 | Description = desc; 20 | Synopsis = synopsis; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/Core/Attributes/ExampleAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Sorlov.PowerShell.Lib.Core.Attributes 4 | { 5 | [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] 6 | public class ExampleAttribute : Attribute 7 | { 8 | public string Code { get; set; } 9 | public string Remarks { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/Core/Attributes/NoAutoDocAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Sorlov.PowerShell.Lib.Core.Attributes 4 | { 5 | [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] 6 | public class NoAutoDocAttribute : Attribute 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/Core/Attributes/PSPropertySortAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Sorlov.PowerShell.Lib.Core.Attributes 4 | { 5 | [AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)] 6 | public class PSPropertySortAttribute : Attribute 7 | { 8 | 9 | private int _sortID = 1; 10 | 11 | /// 12 | /// This will define the sort order for this property. The property with the smallest 13 | /// SortID will be sorted first, then the one with the next higher SortID and so on. 14 | /// 15 | public int SortID 16 | { 17 | get { return _sortID; } 18 | set { _sortID = value; } 19 | } 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/Core/Attributes/PSReturnableObjectAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Sorlov.PowerShell.Lib.Core.Attributes 4 | { 5 | [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)] 6 | public class PSReturnableObjectAttribute : Attribute 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/Core/Attributes/RelatedCmdletsAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Sorlov.PowerShell.Lib.Core.Attributes 5 | { 6 | [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] 7 | public class RelatedCmdletsAttribute : Attribute 8 | { 9 | public List RelatedCmdlets { get; set; } 10 | 11 | public string[] ExternalCmdlets { get; set; } 12 | 13 | public RelatedCmdletsAttribute(params Type[] type) 14 | { 15 | List cmdlets = new List(); 16 | foreach (Type t in type) 17 | { 18 | cmdlets.Add(t); 19 | } 20 | RelatedCmdlets = cmdlets; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/Core/Attributes/SupportsWildcardsAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Sorlov.PowerShell.Lib.Core.Attributes 4 | { 5 | [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)] 6 | public class SupportsWildcardsAttribute : Attribute 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/DNS/Records/NotUsed/RecordA6.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | */ 4 | 5 | namespace Heijden.DNS 6 | { 7 | public class RecordA6 : Record 8 | { 9 | public byte[] RDATA; 10 | 11 | public RecordA6(RecordReader rr) 12 | { 13 | // re-read length 14 | ushort RDLENGTH = rr.ReadUInt16(-2); 15 | RDATA = rr.ReadBytes(RDLENGTH); 16 | } 17 | 18 | public override string ToString() 19 | { 20 | return string.Format("not-used"); 21 | } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/DNS/Records/NotUsed/RecordAPL.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | */ 4 | 5 | namespace Heijden.DNS 6 | { 7 | public class RecordAPL : Record 8 | { 9 | public byte[] RDATA; 10 | 11 | public RecordAPL(RecordReader rr) 12 | { 13 | // re-read length 14 | ushort RDLENGTH = rr.ReadUInt16(-2); 15 | RDATA = rr.ReadBytes(RDLENGTH); 16 | } 17 | 18 | public override string ToString() 19 | { 20 | return string.Format("not-used"); 21 | } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/DNS/Records/NotUsed/RecordATMA.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | */ 4 | 5 | namespace Heijden.DNS 6 | { 7 | public class RecordATMA : Record 8 | { 9 | public byte[] RDATA; 10 | 11 | public RecordATMA(RecordReader rr) 12 | { 13 | // re-read length 14 | ushort RDLENGTH = rr.ReadUInt16(-2); 15 | RDATA = rr.ReadBytes(RDLENGTH); 16 | } 17 | 18 | public override string ToString() 19 | { 20 | return string.Format("not-used"); 21 | } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/DNS/Records/NotUsed/RecordCERT.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | */ 4 | 5 | namespace Heijden.DNS 6 | { 7 | public class RecordCERT : Record 8 | { 9 | public byte[] RDATA; 10 | 11 | public RecordCERT(RecordReader rr) 12 | { 13 | // re-read length 14 | ushort RDLENGTH = rr.ReadUInt16(-2); 15 | RDATA = rr.ReadBytes(RDLENGTH); 16 | } 17 | 18 | public override string ToString() 19 | { 20 | return string.Format("not-used"); 21 | } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/DNS/Records/NotUsed/RecordDHCID.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | */ 4 | 5 | namespace Heijden.DNS 6 | { 7 | public class RecordDHCID : Record 8 | { 9 | public byte[] RDATA; 10 | 11 | public RecordDHCID(RecordReader rr) 12 | { 13 | // re-read length 14 | ushort RDLENGTH = rr.ReadUInt16(-2); 15 | RDATA = rr.ReadBytes(RDLENGTH); 16 | } 17 | 18 | public override string ToString() 19 | { 20 | return string.Format("not-used"); 21 | } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/DNS/Records/NotUsed/RecordDNSKEY.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | */ 4 | 5 | namespace Heijden.DNS 6 | { 7 | public class RecordDNSKEY : Record 8 | { 9 | public byte[] RDATA; 10 | 11 | public RecordDNSKEY(RecordReader rr) 12 | { 13 | // re-read length 14 | ushort RDLENGTH = rr.ReadUInt16(-2); 15 | RDATA = rr.ReadBytes(RDLENGTH); 16 | } 17 | 18 | public override string ToString() 19 | { 20 | return string.Format("not-used"); 21 | } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/DNS/Records/NotUsed/RecordEID.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | */ 4 | 5 | namespace Heijden.DNS 6 | { 7 | public class RecordEID : Record 8 | { 9 | public byte[] RDATA; 10 | 11 | public RecordEID(RecordReader rr) 12 | { 13 | // re-read length 14 | ushort RDLENGTH = rr.ReadUInt16(-2); 15 | RDATA = rr.ReadBytes(RDLENGTH); 16 | } 17 | 18 | public override string ToString() 19 | { 20 | return string.Format("not-used"); 21 | } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/DNS/Records/NotUsed/RecordGID.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | */ 4 | 5 | namespace Heijden.DNS 6 | { 7 | public class RecordGID : Record 8 | { 9 | public byte[] RDATA; 10 | 11 | public RecordGID(RecordReader rr) 12 | { 13 | // re-read length 14 | ushort RDLENGTH = rr.ReadUInt16(-2); 15 | RDATA = rr.ReadBytes(RDLENGTH); 16 | } 17 | 18 | public override string ToString() 19 | { 20 | return string.Format("not-used"); 21 | } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/DNS/Records/NotUsed/RecordHIP.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | */ 4 | 5 | namespace Heijden.DNS 6 | { 7 | public class RecordHIP : Record 8 | { 9 | public byte[] RDATA; 10 | 11 | public RecordHIP(RecordReader rr) 12 | { 13 | // re-read length 14 | ushort RDLENGTH = rr.ReadUInt16(-2); 15 | RDATA = rr.ReadBytes(RDLENGTH); 16 | } 17 | 18 | public override string ToString() 19 | { 20 | return string.Format("not-used"); 21 | } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/DNS/Records/NotUsed/RecordIPSECKEY.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | */ 4 | 5 | namespace Heijden.DNS 6 | { 7 | public class RecordIPSECKEY : Record 8 | { 9 | public byte[] RDATA; 10 | 11 | public RecordIPSECKEY(RecordReader rr) 12 | { 13 | // re-read length 14 | ushort RDLENGTH = rr.ReadUInt16(-2); 15 | RDATA = rr.ReadBytes(RDLENGTH); 16 | } 17 | 18 | public override string ToString() 19 | { 20 | return string.Format("not-used"); 21 | } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/DNS/Records/NotUsed/RecordNIMLOC.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | */ 4 | 5 | namespace Heijden.DNS 6 | { 7 | public class RecordNIMLOC : Record 8 | { 9 | public byte[] RDATA; 10 | 11 | public RecordNIMLOC(RecordReader rr) 12 | { 13 | // re-read length 14 | ushort RDLENGTH = rr.ReadUInt16(-2); 15 | RDATA = rr.ReadBytes(RDLENGTH); 16 | } 17 | 18 | public override string ToString() 19 | { 20 | return string.Format("not-used"); 21 | } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/DNS/Records/NotUsed/RecordNSEC.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | */ 4 | 5 | namespace Heijden.DNS 6 | { 7 | public class RecordNSEC : Record 8 | { 9 | public byte[] RDATA; 10 | 11 | public RecordNSEC(RecordReader rr) 12 | { 13 | // re-read length 14 | ushort RDLENGTH = rr.ReadUInt16(-2); 15 | RDATA = rr.ReadBytes(RDLENGTH); 16 | } 17 | 18 | public override string ToString() 19 | { 20 | return string.Format("not-used"); 21 | } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/DNS/Records/NotUsed/RecordNSEC3.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | */ 4 | 5 | namespace Heijden.DNS 6 | { 7 | public class RecordNSEC3 : Record 8 | { 9 | public byte[] RDATA; 10 | 11 | public RecordNSEC3(RecordReader rr) 12 | { 13 | // re-read length 14 | ushort RDLENGTH = rr.ReadUInt16(-2); 15 | RDATA = rr.ReadBytes(RDLENGTH); 16 | } 17 | 18 | public override string ToString() 19 | { 20 | return string.Format("not-used"); 21 | } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/DNS/Records/NotUsed/RecordNSEC3PARAM.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | */ 4 | 5 | namespace Heijden.DNS 6 | { 7 | public class RecordNSEC3PARAM : Record 8 | { 9 | public byte[] RDATA; 10 | 11 | public RecordNSEC3PARAM(RecordReader rr) 12 | { 13 | // re-read length 14 | ushort RDLENGTH = rr.ReadUInt16(-2); 15 | RDATA = rr.ReadBytes(RDLENGTH); 16 | } 17 | 18 | public override string ToString() 19 | { 20 | return string.Format("not-used"); 21 | } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/DNS/Records/NotUsed/RecordOPT.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | */ 4 | 5 | namespace Heijden.DNS 6 | { 7 | public class RecordOPT : Record 8 | { 9 | public byte[] RDATA; 10 | 11 | public RecordOPT(RecordReader rr) 12 | { 13 | // re-read length 14 | ushort RDLENGTH = rr.ReadUInt16(-2); 15 | RDATA = rr.ReadBytes(RDLENGTH); 16 | } 17 | 18 | public override string ToString() 19 | { 20 | return string.Format("not-used"); 21 | } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/DNS/Records/NotUsed/RecordRRSIG.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | */ 4 | 5 | namespace Heijden.DNS 6 | { 7 | public class RecordRRSIG : Record 8 | { 9 | public byte[] RDATA; 10 | 11 | public RecordRRSIG(RecordReader rr) 12 | { 13 | // re-read length 14 | ushort RDLENGTH = rr.ReadUInt16(-2); 15 | RDATA = rr.ReadBytes(RDLENGTH); 16 | } 17 | 18 | public override string ToString() 19 | { 20 | return string.Format("not-used"); 21 | } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/DNS/Records/NotUsed/RecordSINK.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | */ 4 | 5 | namespace Heijden.DNS 6 | { 7 | public class RecordSINK : Record 8 | { 9 | public byte[] RDATA; 10 | 11 | public RecordSINK(RecordReader rr) 12 | { 13 | // re-read length 14 | ushort RDLENGTH = rr.ReadUInt16(-2); 15 | RDATA = rr.ReadBytes(RDLENGTH); 16 | } 17 | 18 | public override string ToString() 19 | { 20 | return string.Format("not-used"); 21 | } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/DNS/Records/NotUsed/RecordSPF.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | */ 4 | 5 | namespace Heijden.DNS 6 | { 7 | public class RecordSPF : Record 8 | { 9 | public byte[] RDATA; 10 | 11 | public RecordSPF(RecordReader rr) 12 | { 13 | // re-read length 14 | ushort RDLENGTH = rr.ReadUInt16(-2); 15 | RDATA = rr.ReadBytes(RDLENGTH); 16 | } 17 | 18 | public override string ToString() 19 | { 20 | return string.Format("not-used"); 21 | } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/DNS/Records/NotUsed/RecordSSHFP.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | */ 4 | 5 | namespace Heijden.DNS 6 | { 7 | public class RecordSSHFP : Record 8 | { 9 | public byte[] RDATA; 10 | 11 | public RecordSSHFP(RecordReader rr) 12 | { 13 | // re-read length 14 | ushort RDLENGTH = rr.ReadUInt16(-2); 15 | RDATA = rr.ReadBytes(RDLENGTH); 16 | } 17 | 18 | public override string ToString() 19 | { 20 | return string.Format("not-used"); 21 | } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/DNS/Records/NotUsed/RecordUID.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | */ 4 | 5 | namespace Heijden.DNS 6 | { 7 | public class RecordUID : Record 8 | { 9 | public byte[] RDATA; 10 | 11 | public RecordUID(RecordReader rr) 12 | { 13 | // re-read length 14 | ushort RDLENGTH = rr.ReadUInt16(-2); 15 | RDATA = rr.ReadBytes(RDLENGTH); 16 | } 17 | 18 | public override string ToString() 19 | { 20 | return string.Format("not-used"); 21 | } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/DNS/Records/NotUsed/RecordUINFO.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | */ 4 | 5 | namespace Heijden.DNS 6 | { 7 | public class RecordUINFO : Record 8 | { 9 | public byte[] RDATA; 10 | 11 | public RecordUINFO(RecordReader rr) 12 | { 13 | // re-read length 14 | ushort RDLENGTH = rr.ReadUInt16(-2); 15 | RDATA = rr.ReadBytes(RDLENGTH); 16 | } 17 | 18 | public override string ToString() 19 | { 20 | return string.Format("not-used"); 21 | } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/DNS/Records/NotUsed/RecordUNSPEC.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | */ 4 | 5 | namespace Heijden.DNS 6 | { 7 | public class RecordUNSPEC : Record 8 | { 9 | public byte[] RDATA; 10 | 11 | public RecordUNSPEC(RecordReader rr) 12 | { 13 | // re-read length 14 | ushort RDLENGTH = rr.ReadUInt16(-2); 15 | RDATA = rr.ReadBytes(RDLENGTH); 16 | } 17 | 18 | public override string ToString() 19 | { 20 | return string.Format("not-used"); 21 | } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/DNS/Records/NotUsed/RecordUnknown.cs: -------------------------------------------------------------------------------- 1 | namespace Heijden.DNS 2 | { 3 | public class RecordUnknown : Record 4 | { 5 | public byte[] RDATA; 6 | public RecordUnknown(RecordReader rr) 7 | { 8 | // re-read length 9 | ushort RDLENGTH = rr.ReadUInt16(-2); 10 | RDATA = rr.ReadBytes(RDLENGTH); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/DNS/Records/Record.cs: -------------------------------------------------------------------------------- 1 | // Stuff records are made of 2 | 3 | namespace Heijden.DNS 4 | { 5 | public abstract class Record 6 | { 7 | /// 8 | /// The Resource Record this RDATA record belongs to 9 | /// 10 | public RR RR; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/DNS/Records/RecordA.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3.4.1. A RDATA format 3 | 4 | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 5 | | ADDRESS | 6 | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 7 | 8 | where: 9 | 10 | ADDRESS A 32 bit Internet address. 11 | 12 | Hosts that have multiple Internet addresses will have multiple A 13 | records. 14 | * 15 | */ 16 | namespace Heijden.DNS 17 | { 18 | public class RecordA : Record 19 | { 20 | public System.Net.IPAddress Address; 21 | 22 | public RecordA(RecordReader rr) 23 | { 24 | Address = new System.Net.IPAddress(rr.ReadBytes(4)); 25 | //System.Net.IPAddress.TryParse(string.Format("{0}.{1}.{2}.{3}", 26 | // rr.ReadByte(), 27 | // rr.ReadByte(), 28 | // rr.ReadByte(), 29 | // rr.ReadByte()), out this.Address); 30 | } 31 | 32 | public override string ToString() 33 | { 34 | return Address.ToString(); 35 | } 36 | 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/DNS/Records/RecordAAAA.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | #region Rfc info 4 | /* 5 | 2.2 AAAA data format 6 | 7 | A 128 bit IPv6 address is encoded in the data portion of an AAAA 8 | resource record in network byte order (high-order byte first). 9 | */ 10 | #endregion 11 | 12 | namespace Heijden.DNS 13 | { 14 | public class RecordAAAA : Record 15 | { 16 | public System.Net.IPAddress Address; 17 | 18 | public RecordAAAA(RecordReader rr) 19 | { 20 | System.Net.IPAddress.TryParse( 21 | string.Format("{0:x}:{1:x}:{2:x}:{3:x}:{4:x}:{5:x}:{6:x}:{7:x}", 22 | rr.ReadUInt16(), 23 | rr.ReadUInt16(), 24 | rr.ReadUInt16(), 25 | rr.ReadUInt16(), 26 | rr.ReadUInt16(), 27 | rr.ReadUInt16(), 28 | rr.ReadUInt16(), 29 | rr.ReadUInt16()), out this.Address); 30 | } 31 | 32 | public override string ToString() 33 | { 34 | return Address.ToString(); 35 | } 36 | 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/DNS/Records/RecordDNAME.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * http://tools.ietf.org/rfc/rfc2672.txt 3 | * 4 | 3. The DNAME Resource Record 5 | 6 | The DNAME RR has mnemonic DNAME and type code 39 (decimal). 7 | DNAME has the following format: 8 | 9 | DNAME 10 | 11 | The format is not class-sensitive. All fields are required. The 12 | RDATA field is a [DNSIS]. 13 | 14 | * 15 | */ 16 | namespace Heijden.DNS 17 | { 18 | public class RecordDNAME : Record 19 | { 20 | public string TARGET; 21 | 22 | public RecordDNAME(RecordReader rr) 23 | { 24 | TARGET = rr.ReadDomainName(); 25 | } 26 | 27 | public override string ToString() 28 | { 29 | return TARGET; 30 | } 31 | 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/DNS/Records/RecordMB.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3.3.3. MB RDATA format (EXPERIMENTAL) 3 | 4 | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 5 | / MADNAME / 6 | / / 7 | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 8 | 9 | where: 10 | 11 | MADNAME A which specifies a host which has the 12 | specified mailbox. 13 | 14 | MB records cause additional section processing which looks up an A type 15 | RRs corresponding to MADNAME. 16 | */ 17 | namespace Heijden.DNS 18 | { 19 | public class RecordMB : Record 20 | { 21 | public string MADNAME; 22 | 23 | public RecordMB(RecordReader rr) 24 | { 25 | MADNAME = rr.ReadDomainName(); 26 | } 27 | 28 | public override string ToString() 29 | { 30 | return MADNAME; 31 | } 32 | 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/DNS/Records/RecordMG.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3.3.6. MG RDATA format (EXPERIMENTAL) 3 | 4 | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 5 | / MGMNAME / 6 | / / 7 | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 8 | 9 | where: 10 | 11 | MGMNAME A which specifies a mailbox which is a 12 | member of the mail group specified by the domain name. 13 | 14 | MG records cause no additional section processing. 15 | */ 16 | namespace Heijden.DNS 17 | { 18 | public class RecordMG : Record 19 | { 20 | public string MGMNAME; 21 | 22 | public RecordMG(RecordReader rr) 23 | { 24 | MGMNAME = rr.ReadDomainName(); 25 | } 26 | 27 | public override string ToString() 28 | { 29 | return MGMNAME; 30 | } 31 | 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/DNS/Records/RecordMR.cs: -------------------------------------------------------------------------------- 1 | /* 2 | 3.3.8. MR RDATA format (EXPERIMENTAL) 3 | 4 | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 5 | / NEWNAME / 6 | / / 7 | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ 8 | 9 | where: 10 | 11 | NEWNAME A which specifies a mailbox which is the 12 | proper rename of the specified mailbox. 13 | 14 | MR records cause no additional section processing. The main use for MR 15 | is as a forwarding entry for a user who has moved to a different 16 | mailbox. 17 | */ 18 | namespace Heijden.DNS 19 | { 20 | public class RecordMR : Record 21 | { 22 | public string NEWNAME; 23 | 24 | public RecordMR(RecordReader rr) 25 | { 26 | NEWNAME = rr.ReadDomainName(); 27 | } 28 | 29 | public override string ToString() 30 | { 31 | return NEWNAME; 32 | } 33 | 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/DNS/Records/totla.txt: -------------------------------------------------------------------------------- 1 | Record.cs 2 | RecordA.cs 3 | RecordAAAA.cs 4 | RecordCNAME.cs 5 | RecordHINFO.cs 6 | RecordMB.cs 7 | RecordMD.cs 8 | RecordMF.cs 9 | RecordMG.cs 10 | RecordMINFO.cs 11 | RecordMR.cs 12 | RecordMX.cs 13 | RecordNS.cs 14 | RecordNULL.cs 15 | RecordPTR.cs 16 | RecordReader.cs 17 | RecordSOA.cs 18 | RecordTXT.cs 19 | RecordUnknown.cs 20 | RecordWKS.cs 21 | totla.txt 22 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/DNS/Request.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Heijden.DNS 4 | { 5 | public class Request 6 | { 7 | public Header header; 8 | 9 | private List questions; 10 | 11 | public Request() 12 | { 13 | header = new Header(); 14 | header.OPCODE = OPCode.Query; 15 | header.QDCOUNT = 0; 16 | 17 | questions = new List(); 18 | } 19 | 20 | public void AddQuestion(Question question) 21 | { 22 | questions.Add(question); 23 | } 24 | 25 | public byte[] Data 26 | { 27 | get 28 | { 29 | List data = new List(); 30 | header.QDCOUNT = (ushort)questions.Count; 31 | data.AddRange(header.Data); 32 | foreach (Question q in questions) 33 | data.AddRange(q.Data); 34 | return data.ToArray(); 35 | } 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/HtmlAgilityPack/EncodingFoundException.cs: -------------------------------------------------------------------------------- 1 | // HtmlAgilityPack V1.0 - Simon Mourier 2 | using System; 3 | using System.Text; 4 | 5 | namespace HtmlAgilityPack 6 | { 7 | internal class EncodingFoundException : Exception 8 | { 9 | #region Fields 10 | 11 | private Encoding _encoding; 12 | 13 | #endregion 14 | 15 | #region Constructors 16 | 17 | internal EncodingFoundException(Encoding encoding) 18 | { 19 | _encoding = encoding; 20 | } 21 | 22 | #endregion 23 | 24 | #region Properties 25 | 26 | internal Encoding Encoding 27 | { 28 | get { return _encoding; } 29 | } 30 | 31 | #endregion 32 | } 33 | } -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/HtmlAgilityPack/HtmlConsoleListener.cs: -------------------------------------------------------------------------------- 1 | // HtmlAgilityPack V1.0 - Simon Mourier 2 | using System; 3 | using System.Diagnostics; 4 | 5 | namespace HtmlAgilityPack 6 | { 7 | internal class HtmlConsoleListener : TraceListener 8 | { 9 | #region Public Methods 10 | 11 | public override void Write(string Message) 12 | { 13 | Write(Message, ""); 14 | } 15 | 16 | public override void Write(string Message, string Category) 17 | { 18 | Console.Write("T:" + Category + ": " + Message); 19 | } 20 | 21 | public override void WriteLine(string Message) 22 | { 23 | Write(Message + "\n"); 24 | } 25 | 26 | public override void WriteLine(string Message, string Category) 27 | { 28 | Write(Message + "\n", Category); 29 | } 30 | 31 | #endregion 32 | } 33 | } -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/HtmlAgilityPack/HtmlDocument.Xpath.cs: -------------------------------------------------------------------------------- 1 | using System.Xml.XPath; 2 | 3 | namespace HtmlAgilityPack 4 | { 5 | public partial class HtmlDocument : IXPathNavigable 6 | { 7 | /// 8 | /// Creates a new XPathNavigator object for navigating this HTML document. 9 | /// 10 | /// An XPathNavigator object. The XPathNavigator is positioned on the root of the document. 11 | public XPathNavigator CreateNavigator() 12 | { 13 | return new HtmlNodeNavigator(this, _documentnode); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/HtmlAgilityPack/HtmlElementFlag.cs: -------------------------------------------------------------------------------- 1 | // HtmlAgilityPack V1.0 - Simon Mourier 2 | using System; 3 | 4 | namespace HtmlAgilityPack 5 | { 6 | /// 7 | /// Flags that describe the behavior of an Element node. 8 | /// 9 | [Flags] 10 | public enum HtmlElementFlag 11 | { 12 | /// 13 | /// The node is a CDATA node. 14 | /// 15 | CData = 1, 16 | 17 | /// 18 | /// The node is empty. META or IMG are example of such nodes. 19 | /// 20 | Empty = 2, 21 | 22 | /// 23 | /// The node will automatically be closed during parsing. 24 | /// 25 | Closed = 4, 26 | 27 | /// 28 | /// The node can overlap. 29 | /// 30 | CanOverlap = 8 31 | } 32 | } -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/HtmlAgilityPack/HtmlNodeType.cs: -------------------------------------------------------------------------------- 1 | // HtmlAgilityPack V1.0 - Simon Mourier 2 | namespace HtmlAgilityPack 3 | { 4 | /// 5 | /// Represents the type of a node. 6 | /// 7 | public enum HtmlNodeType 8 | { 9 | /// 10 | /// The root of a document. 11 | /// 12 | Document, 13 | 14 | /// 15 | /// An HTML element. 16 | /// 17 | Element, 18 | 19 | /// 20 | /// An HTML comment. 21 | /// 22 | Comment, 23 | 24 | /// 25 | /// A text node is always the child of an element or a document node. 26 | /// 27 | Text, 28 | } 29 | } -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/HtmlAgilityPack/HtmlWebException.cs: -------------------------------------------------------------------------------- 1 | // HtmlAgilityPack V1.0 - Simon Mourier 2 | using System; 3 | 4 | namespace HtmlAgilityPack 5 | { 6 | /// 7 | /// Represents an exception thrown by the HtmlWeb utility class. 8 | /// 9 | public class HtmlWebException : Exception 10 | { 11 | #region Constructors 12 | 13 | /// 14 | /// Creates an instance of the HtmlWebException. 15 | /// 16 | /// The exception's message. 17 | public HtmlWebException(string message) 18 | : base(message) 19 | { 20 | } 21 | 22 | #endregion 23 | } 24 | } -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/HtmlAgilityPack/MixedCodeDocumentFragmentType.cs: -------------------------------------------------------------------------------- 1 | // HtmlAgilityPack V1.0 - Simon Mourier 2 | namespace HtmlAgilityPack 3 | { 4 | /// 5 | /// Represents the type of fragment in a mixed code document. 6 | /// 7 | public enum MixedCodeDocumentFragmentType 8 | { 9 | /// 10 | /// The fragment contains code. 11 | /// 12 | Code, 13 | 14 | /// 15 | /// The fragment contains text. 16 | /// 17 | Text, 18 | } 19 | } -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/HtmlAgilityPack/MixedCodeDocumentTextFragment.cs: -------------------------------------------------------------------------------- 1 | // HtmlAgilityPack V1.0 - Simon Mourier 2 | namespace HtmlAgilityPack 3 | { 4 | /// 5 | /// Represents a fragment of text in a mixed code document. 6 | /// 7 | public class MixedCodeDocumentTextFragment : MixedCodeDocumentFragment 8 | { 9 | #region Constructors 10 | 11 | internal MixedCodeDocumentTextFragment(MixedCodeDocument doc) 12 | : 13 | base(doc, MixedCodeDocumentFragmentType.Text) 14 | { 15 | } 16 | 17 | #endregion 18 | 19 | #region Properties 20 | 21 | /// 22 | /// Gets the fragment text. 23 | /// 24 | public string Text 25 | { 26 | get { return FragmentText; } 27 | set { FragmentText = value; } 28 | } 29 | 30 | #endregion 31 | } 32 | } -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/HtmlAgilityPack/NameValuePair.cs: -------------------------------------------------------------------------------- 1 | // HtmlAgilityPack V1.0 - Simon Mourier 2 | namespace HtmlAgilityPack 3 | { 4 | internal class NameValuePair 5 | { 6 | #region Fields 7 | 8 | internal readonly string Name; 9 | internal string Value; 10 | 11 | #endregion 12 | 13 | #region Constructors 14 | 15 | internal NameValuePair() 16 | { 17 | } 18 | 19 | internal NameValuePair(string name) 20 | : 21 | this() 22 | { 23 | Name = name; 24 | } 25 | 26 | internal NameValuePair(string name, string value) 27 | : 28 | this(name) 29 | { 30 | Value = value; 31 | } 32 | 33 | #endregion 34 | } 35 | } -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/HtmlAgilityPack/Trace.FullFramework.cs: -------------------------------------------------------------------------------- 1 | namespace HtmlAgilityPack 2 | { 3 | partial class Trace 4 | { 5 | partial void WriteLineIntern(string message,string category) 6 | { 7 | System.Diagnostics.Debug.WriteLine(message,category); 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/HtmlAgilityPack/Trace.cs: -------------------------------------------------------------------------------- 1 | namespace HtmlAgilityPack 2 | { 3 | internal partial class Trace 4 | { 5 | internal static Trace _current; 6 | internal static Trace Current 7 | { 8 | get 9 | { 10 | if(_current == null) 11 | _current = new Trace(); 12 | return _current; 13 | } 14 | } 15 | partial void WriteLineIntern(string message,string category); 16 | public static void WriteLine(string message,string category) 17 | { 18 | Current.WriteLineIntern(message,category); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/HtmlAgilityPack/Utilities.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace HtmlAgilityPack 4 | { 5 | internal static class Utilities 6 | { 7 | public static TValue GetDictionaryValueOrNull(Dictionary dict, TKey key) where TKey: class 8 | { 9 | return dict.ContainsKey(key) ? dict[key] : default(TValue); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/MicrosoftLive/LiveConnectItem.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Mjollnir; 3 | 4 | namespace Sorlov.PowerShell.Lib.MicrosoftLive 5 | { 6 | public abstract class LiveConnectItem 7 | { 8 | public LiveConnectItem(IDictionary source) 9 | { 10 | ThrowArgumentException.IfNull(source, "source"); 11 | ThrowArgumentException.IfOutOfRange(!source.ContainsKey("id"), "source"); 12 | 13 | this.Properties = source; 14 | } 15 | 16 | public IDictionary Properties { get; private set; } 17 | 18 | public string Id 19 | { 20 | get 21 | { 22 | return (string)this.Properties["id"]; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/MicrosoftLive/LiveDownloadProgressChangedEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace Sorlov.PowerShell.Lib.MicrosoftLive 4 | { 5 | public class LiveDownloadProgressChangedEventArgs : ProgressChangedEventArgs 6 | { 7 | public LiveDownloadProgressChangedEventArgs(long bytesReceived, long totalBytesToReceive, object userState) 8 | : base((int)((totalBytesToReceive > 0) ? (100 * bytesReceived / totalBytesToReceive) : 0), userState) 9 | { 10 | this.BytesReceived = bytesReceived; 11 | this.TotalBytesToReveive = totalBytesToReceive; 12 | } 13 | 14 | public long BytesReceived { get; private set; } 15 | 16 | public long TotalBytesToReveive { get; private set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/MicrosoftLive/LiveDownloadResult.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using Mjollnir; 4 | 5 | namespace Sorlov.PowerShell.Lib.MicrosoftLive 6 | { 7 | public class LiveDownloadResult 8 | { 9 | public LiveDownloadResult(Exception error, bool cancelled) 10 | { 11 | this.Error = error; 12 | this.Cancelled = cancelled; 13 | } 14 | 15 | public LiveDownloadResult(Stream result) 16 | { 17 | ThrowArgumentException.IfNull(result, "result"); 18 | 19 | this.Result = result; 20 | } 21 | 22 | public bool Cancelled { get; private set; } 23 | 24 | public Exception Error { get; private set; } 25 | 26 | public Stream Result { get; private set; } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/MicrosoftLive/LiveUploadProgressChangedEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace Sorlov.PowerShell.Lib.MicrosoftLive 4 | { 5 | public class LiveUploadProgressChangedEventArgs : ProgressChangedEventArgs 6 | { 7 | public LiveUploadProgressChangedEventArgs(long bytesSent, long totalBytesToSend, object userState) 8 | : base((int)((totalBytesToSend > 0) ? (100 * bytesSent / totalBytesToSend) : 0), userState) 9 | { 10 | this.BytesSent = bytesSent; 11 | this.TotalBytesToSend = totalBytesToSend; 12 | } 13 | 14 | public long BytesSent { get; private set; } 15 | 16 | public long TotalBytesToSend { get; private set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/MicrosoftOffice/Automation/ErrorStrings.cs: -------------------------------------------------------------------------------- 1 | namespace Sorlov.PowerShell.Lib.MicrosoftOffice.Automation 2 | { 3 | public static class ErrorStrings 4 | { 5 | public static string INVALID_OBJECT = "Provide a valid Automation object"; 6 | public static string LATEBINDING_CALL_FAILED = "Automation call failed"; 7 | public static string LATEBINDING_EMPTY_CALL_STRING = "Enter an operation to be called"; 8 | public static string LATEBINDING_MISMATCHING_ARGS_AND_REFERENCE_ARRAYS = "Array length is different from args length"; 9 | public static string LATEBINDING_OBJECT_NOT_SET = "Automation object instance not set "; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/MicrosoftOffice/Automation/IDynamic.cs: -------------------------------------------------------------------------------- 1 | namespace Sorlov.PowerShell.Lib.MicrosoftOffice.Automation 2 | { 3 | /// 4 | /// Implements an interface to perform operations over a type using 5 | /// late binding calls 6 | /// 7 | public interface IDynamic : 8 | IPropertyCall, 9 | IMethodCall, 10 | IIndexerCall, 11 | IFieldCall, 12 | IOperationLastCallParameters 13 | { 14 | /// 15 | /// Object which late binding calls will be dispatched to 16 | /// 17 | object InstanceObject { get; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/MicrosoftOffice/Automation/IFieldCall.cs: -------------------------------------------------------------------------------- 1 | namespace Sorlov.PowerShell.Lib.MicrosoftOffice.Automation 2 | { 3 | /// 4 | /// Provides an interface for specifying a field to access on a type 5 | /// 6 | public interface IFieldCall 7 | { 8 | /// 9 | /// Selects the field over which we will invoke an operation. 10 | /// 11 | /// String with the name of the field to be invoked 12 | /// 13 | /// An that will establish the operation to 14 | /// perform over the field specifyed by the fieldName parameter. 15 | /// 16 | IGetSetOperations Field(string fieldName); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/MicrosoftOffice/Automation/IIndexerCall.cs: -------------------------------------------------------------------------------- 1 | namespace Sorlov.PowerShell.Lib.MicrosoftOffice.Automation 2 | { 3 | /// 4 | /// Provides an interface for performing common indexer operations over a type 5 | /// 6 | public interface IIndexerCall 7 | { 8 | /// 9 | /// Performs indexer access over a type. 10 | /// 11 | /// object used as indexer 12 | /// 13 | /// An instance that will establish the operation to 14 | /// perform over the specifyed index. 15 | /// 16 | IGetSetOperations Index(params object[] indexList); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/MicrosoftOffice/Automation/IMethodCall.cs: -------------------------------------------------------------------------------- 1 | namespace Sorlov.PowerShell.Lib.MicrosoftOffice.Automation 2 | { 3 | /// 4 | /// Provides an interface for specifying a method to invoke on a type 5 | /// 6 | public interface IMethodCall 7 | { 8 | /// 9 | /// Sets the Method name to be invoked 10 | /// 11 | /// String with the name of the method to be invoked 12 | /// 13 | /// An that will establish the parameters to 14 | /// add to this method invocation, and also will allow to perform the method real invocation. 15 | /// 16 | IMethodOperations Method(string methodName); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/MicrosoftOffice/Automation/IOperationLastCallParameters.cs: -------------------------------------------------------------------------------- 1 | namespace Sorlov.PowerShell.Lib.MicrosoftOffice.Automation 2 | { 3 | /// 4 | /// Represents the parameters used in a Method invocation 5 | /// 6 | public interface IOperationLastCallParameters 7 | { 8 | /// 9 | /// Returns the value of the parameters after the call to any 10 | /// method 11 | /// Only usefull to retrieve the values of the call that were passed as 12 | /// reference, and thus has been potentially modified. 13 | /// 14 | /// 15 | /// All parameters passed to the method are referenced after the call to an 16 | /// method, either they were passed as 17 | /// reference or not. 18 | /// 19 | object[] LastCallParameters { get; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/MicrosoftOffice/Automation/IPropertyCall.cs: -------------------------------------------------------------------------------- 1 | namespace Sorlov.PowerShell.Lib.MicrosoftOffice.Automation 2 | { 3 | /// 4 | /// Provides an interface for specifying a property to access on a type 5 | /// 6 | public interface IPropertyCall 7 | { 8 | /// 9 | /// Selects the property over which we will invoke an operation. 10 | /// 11 | /// String with the name of the property to be invoked 12 | /// 13 | /// An that will establish the operation to 14 | /// perform over the property specifyed by the propertyName parameter. 15 | /// 16 | IGetSetOperations Property(string propertyName); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/MicrosoftOffice/Excel/ExcelCell.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DSorlov/Sorlov.PowerShell/f07bf27620aca92b635d7846fcaff02c28546c0b/Sorlov.PowerShell/Lib/MicrosoftOffice/Excel/ExcelCell.cs -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/MicrosoftOffice/Excel/ExcelColumn.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DSorlov/Sorlov.PowerShell/f07bf27620aca92b635d7846fcaff02c28546c0b/Sorlov.PowerShell/Lib/MicrosoftOffice/Excel/ExcelColumn.cs -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/MicrosoftOffice/Excel/ExcelHeaderFooter.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DSorlov/Sorlov.PowerShell/f07bf27620aca92b635d7846fcaff02c28546c0b/Sorlov.PowerShell/Lib/MicrosoftOffice/Excel/ExcelHeaderFooter.cs -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/MicrosoftOffice/Excel/ExcelPackage.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DSorlov/Sorlov.PowerShell/f07bf27620aca92b635d7846fcaff02c28546c0b/Sorlov.PowerShell/Lib/MicrosoftOffice/Excel/ExcelPackage.cs -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/MicrosoftOffice/Excel/ExcelRow.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DSorlov/Sorlov.PowerShell/f07bf27620aca92b635d7846fcaff02c28546c0b/Sorlov.PowerShell/Lib/MicrosoftOffice/Excel/ExcelRow.cs -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/MicrosoftOffice/Excel/ExcelStyles.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DSorlov/Sorlov.PowerShell/f07bf27620aca92b635d7846fcaff02c28546c0b/Sorlov.PowerShell/Lib/MicrosoftOffice/Excel/ExcelStyles.cs -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/MicrosoftOffice/Excel/ExcelWorkbook.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DSorlov/Sorlov.PowerShell/f07bf27620aca92b635d7846fcaff02c28546c0b/Sorlov.PowerShell/Lib/MicrosoftOffice/Excel/ExcelWorkbook.cs -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/MicrosoftOffice/Excel/ExcelWorksheet.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DSorlov/Sorlov.PowerShell/f07bf27620aca92b635d7846fcaff02c28546c0b/Sorlov.PowerShell/Lib/MicrosoftOffice/Excel/ExcelWorksheet.cs -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/MicrosoftOffice/Excel/ExcelWorksheetView.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DSorlov/Sorlov.PowerShell/f07bf27620aca92b635d7846fcaff02c28546c0b/Sorlov.PowerShell/Lib/MicrosoftOffice/Excel/ExcelWorksheetView.cs -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/MicrosoftOffice/Excel/ExcelWorksheets.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DSorlov/Sorlov.PowerShell/f07bf27620aca92b635d7846fcaff02c28546c0b/Sorlov.PowerShell/Lib/MicrosoftOffice/Excel/ExcelWorksheets.cs -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/MicrosoftOffice/OfficeProperties.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DSorlov/Sorlov.PowerShell/f07bf27620aca92b635d7846fcaff02c28546c0b/Sorlov.PowerShell/Lib/MicrosoftOffice/OfficeProperties.cs -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/MicrosoftOffice/Word/Charts/PieChart.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Xml.Linq; 3 | 4 | namespace Sorlov.PowerShell.Lib.MicrosoftOffice.Word 5 | { 6 | /// 7 | /// This element contains the 2-D pie series for this chart. 8 | /// 21.2.2.141 pieChart (Pie Charts) 9 | /// 10 | public class PieChart : Chart 11 | { 12 | public override Boolean IsAxisExist { get { return false; } } 13 | public override Int16 MaxSeriesCount { get { return 1; } } 14 | 15 | protected override XElement CreateChartXml() 16 | { 17 | return XElement.Parse( 18 | @" 19 | "); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/MicrosoftOffice/Word/Footers.cs: -------------------------------------------------------------------------------- 1 | namespace Sorlov.PowerShell.Lib.MicrosoftOffice.Word 2 | { 3 | public class Footers 4 | { 5 | internal Footers() 6 | { 7 | 8 | } 9 | 10 | public Footer odd; 11 | public Footer even; 12 | public Footer first; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/MicrosoftOffice/Word/FormattedText.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Sorlov.PowerShell.Lib.MicrosoftOffice.Word 4 | { 5 | public class FormattedText: IComparable 6 | { 7 | public FormattedText() 8 | { 9 | 10 | } 11 | 12 | public int index; 13 | public string text; 14 | public Formatting formatting; 15 | 16 | public int CompareTo(object obj) 17 | { 18 | FormattedText other = (FormattedText)obj; 19 | FormattedText tf = this; 20 | 21 | if (other.formatting == null || tf.formatting == null) 22 | return -1; 23 | 24 | return tf.formatting.CompareTo(other.formatting); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Lib/MicrosoftOffice/Word/Headers.cs: -------------------------------------------------------------------------------- 1 | namespace Sorlov.PowerShell.Lib.MicrosoftOffice.Word 2 | { 3 | public class Headers 4 | { 5 | internal Headers() 6 | { 7 | } 8 | 9 | public Header odd; 10 | public Header even; 11 | public Header first; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Licenses/HeijdenDNS.txt: -------------------------------------------------------------------------------- 1 | https://www.codeproject.com/Articles/23673/DNS-NET-Resolver-C -------------------------------------------------------------------------------- /Sorlov.PowerShell/Providers/FileSystem/ZipFileDriveInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Management.Automation; 2 | 3 | namespace Sorlov.PowerShell.Providers.FileSystem 4 | { 5 | internal class ZipFileDriveInfo : PSDriveInfo 6 | { 7 | private ZipFileArchive archive; 8 | 9 | public ZipFileArchive Archive 10 | { 11 | get { return archive; } 12 | set { archive = value; } 13 | } 14 | 15 | public ZipFileDriveInfo(PSDriveInfo driveInfo) 16 | : base(driveInfo) 17 | { } 18 | 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Providers/OneDrive/OneDriveInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Management.Automation; 2 | using Sorlov.PowerShell.Lib.MicrosoftLive; 3 | 4 | namespace Sorlov.PowerShell.Providers.FileSystem 5 | { 6 | internal class OneDriveInfo : PSDriveInfo 7 | { 8 | 9 | private LiveConnectClient client; 10 | 11 | public LiveConnectClient Client 12 | { 13 | get { return client; } 14 | set { client = value; } 15 | } 16 | 17 | public OneDriveInfo(PSDriveInfo driveInfo) 18 | : base(driveInfo) 19 | { } 20 | 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Resources/General/Format.txt: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Sorlov.PowerShell/Resources/General/Prompt.txt: -------------------------------------------------------------------------------- 1 | function global:prompt 2 | { 3 | $titleString = "{2} [{0}@{1}]" -f [System.Security.Principal.WindowsIdentity]::GetCurrent().Name, [System.Net.Dns]::GetHostName(), $(Get-History -Count 1 | Select -Expand Commandline) 4 | (Get-Host).UI.RawUI.WindowTitle = $titleString 5 | 6 | if ($NestedPromptLevel -ge 1) 7 | { 8 | Write-Host "[" -NoNewline -ForegroundColor Yellow 9 | Write-Host $NestedPromptLevel -NoNewline -ForegroundColor White 10 | Write-Host "]" -NoNewline -ForegroundColor Yellow 11 | } 12 | 13 | Write-Host ("$(Get-Location)") -NoNewline -ForegroundColor White 14 | if (Get-AdminStatus) 15 | { 16 | Write-Host ("#") -NoNewline -ForegroundColor Red 17 | } 18 | else 19 | { 20 | Write-Host ("$") -NoNewline -ForegroundColor Green 21 | } 22 | 23 | return " " 24 | } -------------------------------------------------------------------------------- /Sorlov.PowerShell/Resources/Office/documentStyles.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DSorlov/Sorlov.PowerShell/f07bf27620aca92b635d7846fcaff02c28546c0b/Sorlov.PowerShell/Resources/Office/documentStyles.gz -------------------------------------------------------------------------------- /Sorlov.PowerShell/Resources/Office/tableStyles.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DSorlov/Sorlov.PowerShell/f07bf27620aca92b635d7846fcaff02c28546c0b/Sorlov.PowerShell/Resources/Office/tableStyles.gz -------------------------------------------------------------------------------- /Sorlov.PowerShell/Resources/SelfHostedPS/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | 3 | //[assembly: AssemblyTitle("$SCRIPTNAME$")] 4 | //[assembly: AssemblyCompany("$COMPANY$")] 5 | //[assembly: AssemblyDescription("$DESCRIPTION$")] 6 | //[assembly: AssemblyProduct("$SCRIPTNAME$")] 7 | //[assembly: AssemblyCopyright("$COPYRIGHT$")] 8 | //[assembly: AssemblyVersion("$VERSION$")] 9 | //[assembly: AssemblyFileVersion("$VERSION$")] 10 | //[assembly: AssemblyCulture("$CULTURENAME$")] -------------------------------------------------------------------------------- /Sorlov.PowerShell/Resources/Templates/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Sorlov.PowerShell.Lib.HTApps; 3 | 4 | namespace Sorlov.PowerShell.SelfHosted.HTApps 5 | { 6 | static class Program 7 | { 8 | [MTAThread] 9 | static void Main(string[] args) 10 | { 11 | System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; 12 | System.Threading.Thread.CurrentThread.CurrentUICulture = System.Globalization.CultureInfo.InvariantCulture; 13 | 14 | System.Windows.Forms.Application.EnableVisualStyles(); 15 | System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false); 16 | System.Windows.Forms.Application.Run(new ScriptForm("$$FILENAME$$")); 17 | 18 | 19 | } 20 | } 21 | 22 | 23 | } -------------------------------------------------------------------------------- /Sorlov.PowerShell/Resources/Templates/StandardBlock.txt: -------------------------------------------------------------------------------- 1 | <% 2 | 3 | # 4 | # This block is automatically inserted when using ConvertTo-HTApp 5 | # 6 | # $App is the application context. 7 | # $Document is the htmlDocument context 8 | # 9 | 10 | $App.Title ="$TITLE$" 11 | $App.Width = $WIDTH$ 12 | $App.Height = $HEIGHT$ 13 | 14 | # 15 | # This is also a good place to define all functions that should be called from 16 | # the JavaScript PSRuntime compability layer. 17 | # 18 | 19 | %> 20 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Resources/Templates/StringExtension.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Sorlov.PowerShell 4 | { 5 | public static class StringExtension 6 | { 7 | public static string Replace(this string originalString, string oldValue, string newValue, StringComparison comparisonType) 8 | { 9 | int startIndex = 0; 10 | while (true) 11 | { 12 | startIndex = originalString.IndexOf(oldValue, startIndex, comparisonType); 13 | if (startIndex == -1) 14 | break; 15 | 16 | originalString = originalString.Substring(0, startIndex) + newValue + originalString.Substring(startIndex + oldValue.Length); 17 | 18 | startIndex += newValue.Length; 19 | } 20 | 21 | return originalString; 22 | } 23 | 24 | 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/SelfHosted/Lib/Signature.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Management.Automation; 4 | using System.Reflection; 5 | 6 | namespace Sorlov.PowerShell.SelfHosted.Lib 7 | { 8 | internal static class SignatureProxy 9 | { 10 | internal static Signature GenerateSignature(params object[] inputArgs) 11 | { 12 | List constructorTypes = new List(); 13 | 14 | foreach (object inputObject in inputArgs) 15 | constructorTypes.Add(inputObject.GetType()); 16 | 17 | Type type = typeof(System.Management.Automation.Signature); 18 | ConstructorInfo dynMethod = type.GetConstructor(BindingFlags.Instance | BindingFlags.NonPublic, null, constructorTypes.ToArray(), null); 19 | return (Signature)dynMethod.Invoke(inputArgs); 20 | } 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/Sorlov.PowerShell.psd1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DSorlov/Sorlov.PowerShell/f07bf27620aca92b635d7846fcaff02c28546c0b/Sorlov.PowerShell/Sorlov.PowerShell.psd1 -------------------------------------------------------------------------------- /Sorlov.PowerShell/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Sorlov.PowerShell/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /docs/CNAME: -------------------------------------------------------------------------------- 1 | pse.powershell.zone -------------------------------------------------------------------------------- /docs/_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-modernist -------------------------------------------------------------------------------- /docs/readme.md: -------------------------------------------------------------------------------- 1 | 2 | --------------------------------------------------------------------------------