Portable fileinfo
Author: c | 2025-04-24
Portable FileInfo - X 64-bit Download - x64-bit download - freeware, shareware and software downloads. Portable FileInfo - X 64-bit Download. Link to Us Portable FileInfo 2.4
Portable FileInfo - FREE Download Portable FileInfo 2.3 File
Result = await pgp.InspectAsync(inputFileStream);Inspect String// Load keysstring publicKey = File.ReadAllText(@"C:\TEMP\Keys\public.asc");string privatyeKey = File.ReadAllText(@"C:\TEMP\Keys\private.asc");EncryptionKeys encryptionKeys = new EncryptionKeys(publicKey, privateKey, "password");// InspectPGP pgp = new PGP(encryptionKeys);PgpInspectResult result = await pgp.InspectAsync("String to inspect");EncryptEncrypt the provided file, stream or string using a public key.Optional headers can be provided to include in the encrypted file. These can be set by providing a Dictionary to the headers parameter. The key of the dictionary will be the header name and the value will be the header value.gpg --output "C:\TEMP\Content\encrypted.pgp" --encrypt "C:\TEMP\Content\content.txt"Encrypt File// Load keysFileInfo publicKey = new FileInfo(@"C:\TEMP\Keys\public.asc");EncryptionKeys encryptionKeys = new EncryptionKeys(publicKey);// Reference input/output filesFileInfo inputFile = new FileInfo(@"C:\TEMP\Content\content.txt");FileInfo encryptedFile = new FileInfo(@"C:\TEMP\Content\encrypted.pgp");// EncryptPGP pgp = new PGP(encryptionKeys);await pgp.EncryptAsync(inputFile, encryptedFile);Encrypt Stream// Load keysEncryptionKeys encryptionKeys;using (Stream publicKeyStream = new FileStream(@"C:\TEMP\Keys\public.asc", FileMode.Open)) encryptionKeys = new EncryptionKeys(publicKeyStream);PGP pgp = new PGP(encryptionKeys);// Reference input/output filesusing (FileStream inputFileStream = new FileStream(@"C:\TEMP\Content\content.txt", FileMode.Open))using (Stream outputFileStream = File.Create(@"C:\TEMP\Content\encrypted.pgp")) // Encrypt await pgp.EncryptAsync(inputFileStream, outputFileStream);Encrypt String// Load keysstring publicKey = File.ReadAllText(@"C:\TEMP\Keys\public.asc");EncryptionKeys encryptionKeys = new EncryptionKeys(publicKey);// EncryptPGP pgp = new PGP(encryptionKeys);string encryptedContent = await pgp.EncryptAsync("String to encrypt");SignSign the provided file or stream using a private key.Optional headers can be provided to include in the signed file. These can be set by providing a Dictionary to the headers parameter. The key of the dictionary will be the header name and the value will be the header value.gpg --output "C:\TEMP\Content\content.txt" --sign "C:\TEMP\Content\signed.pgp"Sign File// Load keysFileInfo privateKey = new FileInfo(@"C:\TEMP\Keys\private.asc");EncryptionKeys encryptionKeys = new EncryptionKeys(privateKey, "password");// Reference input/output filesFileInfo inputFile = new FileInfo(@"C:\TEMP\Content\content.txt");FileInfo signedFile = new FileInfo(@"C:\TEMP\Content\signed.pgp");// SignPGP pgp = new
PGPLib.SignAndEncryptFile (FileInfo, FileInfo, String, FileInfo
PgpCoreA .NET Core class library for using PGP.This is based on ChoPGP but updated to .NET Standard and to add in a missing utilities class.InstallationTo use PgpCore in your C# project download it from NuGet.Once you have the PgpCore libraries properly referenced in your project, you can include calls to them in your code.Add the following namespaces to use the library:DependenciesPortable.BouncyCastle (>= 1.9.0)UsageThis is intended for usage in projects targeting .NET Standard 2.0.Azure Function ExampleIf you want a (basic) example of how you can use an Azure Function to encrypt/decrypt from Azure Blob Storage I've created a sample project here.MethodsGenerate KeyInspectEncryptSignClear SignEncrypt and SignDecryptVerifyVerify ClearDecrypt and VerifySettingsCompression AlgorithmSymmetric Key AlgorithmPgp Signature TypePublic Key AlgorithmFile TypeHash Algorithm TagGenerate KeyGenerate a new public and private key for the provided username and password.gpg --gen-keyGenerateKeyusing (PGP pgp = new PGP()){ // Generate keys pgp.GenerateKey(new FileInfo(@"C:\TEMP\Keys\public.asc"), new FileInfo(@"C:\TEMP\Keys\private.asc"), "email@email.com", "password");}InspectInspect the provided file, stream or string and return a PGPInspectResult object that contains details on the messages encryption and sign status as well as additional information on filename, headers, etc. where available.gpg --list-packets "C:\TEMP\Content\encrypted.pgp"Inspect File// Load keysFileInfo publicKey = new FileInfo(@"C:\TEMP\Keys\public.asc");FileInfo privateKey = new FileInfo(@"C:\TEMP\Keys\private.asc");EncryptionKeys encryptionKeys = new EncryptionKeys(publicKey, privateKey, "password");// Reference input fileFileInfo inputFile = new FileInfo(@"C:\TEMP\Content\encrypted.pgp");// InspectPGP pgp = new PGP();PgpInspectResult result = await pgp.InspectAsync(inputFile);Inspect Stream// Load keysEncryptionKeys encryptionKeys;using (Stream publicKeyStream = new FileStream(@"C:\TEMP\Keys\public.asc", FileMode.Open))using (Stream privateKeyStream = new FileStream(@"C:\TEMP\Keys\private.asc", FileMode.Open)) encryptionKeys = new EncryptionKeys(publicKeyStream, privateKeyStream, "password");PGP pgp = new PGP(encryptionKeys);// Reference input streamusing (FileStream inputFileStream = new FileStream(@"C:\TEMP\Content\encrypted.pgp", FileMode.Open)) // Inspect PgpInspectResultPGPLib.DecryptFile (FileInfo, FileInfo, String, FileInfo) Method
LParam); [return: MarshalAs(UnmanagedType.Bool)] [DllImport("user32.dll", SetLastError = true)] private static extern bool PostMessage(IntPtr hWnd, WM Msg, IntPtr wParam, IntPtr lParam); public static int AddFont(string fontFilePath) { FileInfo fontFile = new FileInfo(fontFilePath); if (!fontFile.Exists) { return 0; } try { int retVal = AddFontResource(fontFilePath); //This version of SendMessage is a blocking call until all windows respond. //long result = SendMessage(HWND_BROADCAST, WM.FONTCHANGE, IntPtr.Zero, IntPtr.Zero); //Alternatively PostMessage instead of SendMessage to prevent application hang bool posted = PostMessage(HWND_BROADCAST, WM.FONTCHANGE, IntPtr.Zero, IntPtr.Zero); return retVal; } catch { return 0; } } public static int RemoveFont(string fontFileName) { //FileInfo fontFile = new FileInfo(fontFileName); //if (!fontFile.Exists) //{ // return false; //} try { int retVal = RemoveFontResource(fontFileName); //This version of SendMessage is a blocking call until all windows respond. //long result = SendMessage(HWND_BROADCAST, WM.FONTCHANGE, IntPtr.Zero, IntPtr.Zero); //Alternatively PostMessage instead of SendMessage to prevent application hang bool posted = PostMessage(HWND_BROADCAST, WM.FONTCHANGE, IntPtr.Zero, IntPtr.Zero); return retVal; } catch { return 0; } } public enum WM : uint { NULL = 0x0000, CREATE = 0x0001, DESTROY = 0x0002, MOVE = 0x0003, SIZE = 0x0005, ACTIVATE = 0x0006, SETFOCUS = 0x0007, KILLFOCUS = 0x0008, ENABLE = 0x000A, SETREDRAW = 0x000B, SETTEXT = 0x000C, GETTEXT = 0x000D, GETTEXTLENGTH = 0x000E, PAINT = 0x000F, CLOSE = 0x0010, QUERYENDSESSION = 0x0011, QUERYOPEN = 0x0013, ENDSESSION = 0x0016, QUIT = 0x0012, ERASEBKGND = 0x0014, SYSCOLORCHANGE = 0x0015, SHOWWINDOW = 0x0018, WININICHANGE = 0x001A, SETTINGCHANGE = WM.WININICHANGE, DEVMODECHANGE = 0x001B, ACTIVATEAPP = 0x001C, FONTCHANGE = 0x001D, TIMECHANGE = 0x001E, CANCELMODE = 0x001F, SETCURSOR = 0x0020, MOUSEACTIVATE = 0x0021, CHILDACTIVATE = 0x0022, QUEUESYNC = 0x0023, GETMINMAXINFO = 0x0024, PAINTICON = 0x0026, ICONERASEBKGND = 0x0027, NEXTDLGCTL = 0x0028, SPOOLERSTATUS = 0x002A, DRAWITEM = 0x002B, MEASUREITEM = 0x002C, DELETEITEM = 0x002D, VKEYTOITEM = 0x002E, CHARTOITEM = 0x002F, SETFONT = 0x0030, GETFONT = 0x0031, SETHOTKEY = 0x0032, GETHOTKEY =. Portable FileInfo - X 64-bit Download - x64-bit download - freeware, shareware and software downloads. Portable FileInfo - X 64-bit Download. Link to Us Portable FileInfo 2.4 Portable FileInfo Crack With License Code Free Download [Mac/Win] [April-2025] Portable FileInfo is a simple to use and very useful software that allows you to get to file information ofPortable FileInfo 2.4 - Download, Review
Counterparty. This is an overload of the Verify method that takes an additional output argument. Please note that this is not available for the string based method.Verify And Read File// Load keysFileInfo publicKey = new FileInfo(@"C:\TEMP\Keys\public.asc");EncryptionKeys encryptionKeys = new EncryptionKeys(publicKey);// Reference inputFileInfo inputFile = new FileInfo(@"C:\TEMP\Content\signedContent.pgp");FileInfo outputFile = new FileInfo(@"C:\TEMP\Content\decryptedContent.txt");// Verify and readPGP pgp = new PGP(encryptionKeys);bool verified = await pgp.VerifyAsync(inputFile, outputFile);Verify And Read Stream// Load keysEncryptionKeys encryptionKeys;using (Stream publicKeyStream = new FileStream(@"C:\TEMP\Keys\public.asc", FileMode.Open)) encryptionKeys = new EncryptionKeys(publicKeyStream);PGP pgp = new PGP(encryptionKeys);// Reference input filebool verified;using (FileStream inputFileStream = new FileStream(@"C:\TEMP\Content\encryptedContent.pgp", FileMode.Open))using (FileStream outputFileStream = new FileStream(@"C:\TEMP\Content\decryptedContent.pgp", FileMode.Open)) // Verify and read verified = await pgp.VerifyAsync(inputFileStream);Verify And Read String// Load keysstring publicKey = File.ReadAllText(@"C:\TEMP\Keys\public.asc");EncryptionKeys encryptionKeys = new EncryptionKeys(publicKey);PGP pgp = new PGP(encryptionKeys);// Verify and readstring output = string.Empty;bool verified = await pgp.VerifyAsync("String to verify", output);Verify ClearVerify that the clear signed file or stream was signed by the matching private key of the counterparty.gpg --verify "C:\TEMP\Content\clearSigned.pgp"Verify Clear File// Load keysFileInfo publicKey = new FileInfo(@"C:\TEMP\Keys\public.asc");EncryptionKeys encryptionKeys = new EncryptionKeys(publicKey);// Reference inputFileInfo inputFile = new FileInfo(@"C:\TEMP\Content\signedContent.pgp");// VerifyPGP pgp = new PGP(encryptionKeys);bool verified = await pgp.VerifyClearAsync(inputFile);Verify Clear Stream// Load keysEncryptionKeys encryptionKeys;using (Stream publicKeyStream = new FileStream(@"C:\TEMP\Keys\public.asc", FileMode.Open)) encryptionKeys = new EncryptionKeys(publicKeyStream);PGP pgp = new PGP(encryptionKeys);// Reference input filebool verified;using (FileStream inputFileStream = new FileStream(@"C:\TEMP\Content\encryptedContent.pgp", FileMode.Open)) // Verify verified = await pgp.VerifyClearAsync(inputFileStream);Verify Clear String// Load keysstring publicKey = File.ReadAllText(@"C:\TEMP\Keys\public.asc");EncryptionKeys encryptionKeys = new EncryptionKeys(publicKey);PGP pgp = new PGP(encryptionKeys);// Verifybool verified = await pgp.VerifyClearAsync("String to verify");Verify and Read ClearVerify that the clear signed file or stream wasPortable FileInfo Crack Download - areaspettacoli.com
Not be able to verify the signature.gpg --output "C:\TEMP\Content\encryptedAndSigned.pgp" --decrypt "C:\TEMP\Content\decryptedAndVerified.txt"Decrypt File And Verify// Load keysFileInfo publicKey = new FileInfo(@"C:\TEMP\Keys\public.asc");FileInfo privateKey = new FileInfo(@"C:\TEMP\Keys\private.asc");EncryptionKeys encryptionKeys = new EncryptionKeys(publicKey, privateKey, "password");// Reference input/output filesFileInfo inputFile = new FileInfo(@"C:\TEMP\Content\encryptedSigned.pgp");FileInfo outputFile = new FileInfo(@"C:\TEMP\Content\content.txt");// Decrypt and VerifyPGP pgp = new PGP(encryptionKeys);await pgp.DecryptAndVerifyAsync(inputFile, outputFile);Decrypt Stream And Verify// Load keysEncryptionKeys encryptionKeys;using (Stream publicKeyStream = new FileStream(@"C:\TEMP\Keys\public.asc", FileMode.Open))using (Stream privateKeyStream = new FileStream(@"C:\TEMP\Keys\private.asc", FileMode.Open)) encryptionKeys = new EncryptionKeys(publicKeyStream, privateKeyStream, "password");PGP pgp = new PGP(encryptionKeys);// Reference input/output filesusing (FileStream inputFileStream = new FileStream(@"C:\TEMP\Content\encryptedSigned.pgp", FileMode.Open))using (Stream outputFileStream = File.Create(@"C:\TEMP\Content\content.txtp")) // Decrypt and Verify await pgp.DecryptAndVerifyAsync(inputFileStream, outputFileStream);Decrypt String And Verify// Load keysstring publicKey = File.ReadAllText(@"C:\TEMP\Keys\public.asc");string privateKey = File.ReadAllText(@"C:\TEMP\Keys\private.asc");EncryptionKeys encryptionKeys = new EncryptionKeys(publicKey, privateKey, "password");PGP pgp = new PGP(encryptionKeys);// Decrypt and Verifystring encryptedSignedContent = await pgp.DecryptAndVerifyAsync("String to decrypt and verify");SettingsThe PGP object contains a variety of settings properties that can be used to determine how files are encrypted.CompressionAlgorithmThe compression algorithim to be used on the message. This is applied prior to encryption, either to the message or the signed message.Uncompressed - DefaultZipZLibBZip2SymmetricKeyAlgorithmThe private key encryption algorithm.Although TripleDes is the default, it is outdated and being discouraged by security institutions like NIST. Aes is recommended.NullIdeaTripleDes - DefaultCast5BlowfishSaferDesAes128Aes192Aes256TwofishCamellia128Camellia192Camellia256PgpSignatureTypeThe type of signature to be used for file signing.BinaryDocumentCanonicalTextDocumentStandAloneDefaultCertification - DefaultNoCertificationCasualCertificationPositiveCertificationSubkeyBindingPrimaryKeyBindingDirectKeyKeyRevocationSubkeyRevocationCertificationRevocationTimestampPublicKeyAlgorithmThe public key encryption algorithim.RsaGeneral - DefaultRsaEncryptRsaSignElGamalEncryptDsaECDHECDsaElGamalGeneralDiffieHellmanEdDsaFileTypeEncoding to be used for the output file.Binary - DefaultTextUTF8HashAlgorithmTagThe hash algorithim to be used by the signature.MD5Sha1 - DefaultRipeMD160DoubleShaMD2Tiger192Haval5pass160Sha256Sha384Sha512Sha224PGPLib.SignAndEncryptFile (FileInfo, FileInfo, String
.AddCleanupService(x => { //Duration between the cleanup actions. (Default: 1 day) x.Interval = TimeSpan.FromMinutes(1); //Removes cached data which are older than defined duration. x.OlderThan(TimeSpan.FromMinutes(2)); //Removes cached data which are last used since defined duration. x.LastUsedSince(TimeSpan.FromMinutes(2)); //Removes cached data which are expired (based on the loader result). x.Expired(); }) ;">services.AddImageWizard();//orservices.AddImageWizard(options => { options.AllowUnsafeUrl = true; options.AllowedDPR = new double[] { 1.0, 1.5, 2.0, 3.0, 4.0 }; options.Key = new byte[64] { .. }; options.UseETag = true; options.CacheControl.IsEnabled = true; options.CacheControl.MaxAge = TimeSpan.FromDays(365); options.CacheControl.MustRevalidate = false; options.CacheControl.Public = true; options.CacheControl.NoCache = false; options.CacheControl.NoStore = false; //select automatically the compatible mime type by request header options.UseAcceptHeader = true; options.RefreshLastAccessInterval = TimeSpan.FromMinutes(1); options.FallbackHandler = (state, url, cachedData) => { //use the existing cached data if available? if (cachedData != null) { return cachedData; } //load fallback image FileInfo fallbackImage = state switch { LoaderResultState.NotFound => new FileInfo(@"notfound.jpg"), LoaderResultState.Failed => new FileInfo(@"failed.jpg"), _ => throw new Exception() }; if (fallbackImage.Exists == false) { return null; } //convert FileInfo to CachedData return fallbackImage.ToCachedData(); }; }) //registers ImageSharp pipeline for specified mime types .AddImageSharp(c => c .WithMimeTypes(MimeTypes.WebP, MimeTypes.Jpeg, MimeTypes.Png, MimeTypes.Gif) .WithOptions(x => { x.ImageMaxHeight = 4000; x.ImageMaxWidth = 4000; }) //Adds your custom filters .WithFilterBlurFilter>() //Executes custom action before the pipeline is started. .WithPreProcessing(x => { x.Image.Mutate(m => m.AutoOrient()); }) //Executes custom action after the pipeline is finished. .WithPostProcessing(x => { //blurs all images x.Image.Mutate(m => m.Blur()); //overrides target format (Jpeg to WebP) if (x.ImageFormat is JpegFormat) { x.ImageFormat = new WebPFormat() { Lossless = false };Portable FileInfo - X 64-bit Download
New PGP(encryptionKeys);await pgp.ClearSignAsync(inputFile, signedFile);Clear Sign Stream// Load keysEncryptionKeys encryptionKeys;using (Stream privateKeyStream = new FileStream(@"C:\TEMP\Keys\private.asc", FileMode.Open)) encryptionKeys = new EncryptionKeys(privateKeyStream, "password");PGP pgp = new PGP(encryptionKeys);// Reference input/output filesusing (FileStream inputFileStream = new FileStream(@"C:\TEMP\Content\content.txt", FileMode.Open))using (Stream outputFileStream = File.Create(@"C:\TEMP\Content\signed.pgp")) // Sign await pgp.ClearSignAsync(inputFileStream, outputFileStream);Clear Sign String// Load keysstring privateKey = File.ReadAllText(@"C:\TEMP\Keys\private.asc");EncryptionKeys encryptionKeys = new EncryptionKeys(privateKey, "password");PGP pgp = new PGP(encryptionKeys);// Signstring signedContent = await pgp.ClearSignAsync("String to sign");Encrypt and SignEncrypt the provided file, stream or string using a public key and sign using your private key. You usually encrypt with the public key of your counterparty so they can decrypt with their private key and sign with your private key so they can verify with your public key.Although this method is called EncryptAndSign the signature will actually be included within the encrypted message rather than being appended to the encrypted message. This ensures that the original message was composed by the holder of the private key.gpg --encrypt --sign --recipient 'some user ID value' "C:\TEMP\keys\content.txt"Encrypt File And Sign// Load keysFileInfo publicKey = new FileInfo(@"C:\TEMP\Keys\public.asc");FileInfo privateKey = new FileInfo(@"C:\TEMP\Keys\private.asc");EncryptionKeys encryptionKeys = new EncryptionKeys(publicKey, privateKey, "password");// Reference input/output filesFileInfo inputFile = new FileInfo(@"C:\TEMP\Content\content.txt");FileInfo encryptedSignedFile = new FileInfo(@"C:\TEMP\Content\encryptedSigned.pgp");// Encrypt and SignPGP pgp = new PGP(encryptionKeys);await pgp.EncryptAndSignAsync(inputFile, encryptedSignedFile);Encrypt Stream And Sign// Load keysEncryptionKeys encryptionKeys;using (Stream publicKeyStream = new FileStream(@"C:\TEMP\Keys\public.asc", FileMode.Open))using (Stream privateKeyStream = new FileStream(@"C:\TEMP\Keys\private.asc", FileMode.Open)) encryptionKeys = new EncryptionKeys(publicKeyStream, privateKeyStream, "password");PGP pgp = new PGP(encryptionKeys);// Reference input/output filesusing (FileStream inputFileStream = new FileStream(@"C:\TEMP\Content\content.txt", FileMode.Open))using (Stream outputFileStream = File.Create(@"C:\TEMP\Content\signed.pgp")) // Encrypt and Sign await pgp.EncryptAndSignAsync(inputFileStream, outputFileStream);Encrypt String And. Portable FileInfo - X 64-bit Download - x64-bit download - freeware, shareware and software downloads. Portable FileInfo - X 64-bit Download. Link to Us Portable FileInfo 2.4 Portable FileInfo Crack With License Code Free Download [Mac/Win] [April-2025] Portable FileInfo is a simple to use and very useful software that allows you to get to file information of
Portable FileInfo Vista download - The application save the
Sign// Load keysstring publicKey = File.ReadAllText(@"C:\TEMP\Keys\public.asc");string privateKey = File.ReadAllText(@"C:\TEMP\Keys\private.asc");EncryptionKeys encryptionKeys = new EncryptionKeys(publicKey, privateKey, "password");PGP pgp = new PGP(encryptionKeys);// Encrypt and Signstring encryptedSignedContent = await pgp.EncryptAndSignAsync("String to encrypt and sign");DecryptDecrypt the provided file, stream or string using the matching private key and passphrase.gpg --output "C:\TEMP\Content\decrypted.txt" --decrypt "C:\TEMP\Content\encrypted.pgp"Decrypt File// Load keysFileInfo privateKey = new FileInfo(@"C:\TEMP\Keys\private.asc");EncryptionKeys encryptionKeys = new EncryptionKeys(privateKey, "password");// Reference input/output filesFileInfo inputFile = new FileInfo(@"C:\TEMP\Content\encryptedContent.pgp");FileInfo decryptedFile = new FileInfo(@"C:\TEMP\Content\decrypted.txt");// DecryptPGP pgp = new PGP(encryptionKeys);await pgp.DecryptAsync(inputFile, decryptedFile);Decrypt Stream// Load keysEncryptionKeys encryptionKeys;using (Stream privateKeyStream = new FileStream(@"C:\TEMP\Keys\private.asc", FileMode.Open)) encryptionKeys = new EncryptionKeys(privateKeyStream, "password");PGP pgp = new PGP(encryptionKeys);// Reference input/output filesusing (FileStream inputFileStream = new FileStream(@"C:\TEMP\Content\encryptedContent.pgp", FileMode.Open))using (Stream outputFileStream = File.Create(@"C:\TEMP\Content\decrypted.txt")) // Decrypt await pgp.DecryptAsync(inputFileStream, outputFileStream);Decrypt String// Load keysstring privateKey = File.ReadAllText(@"C:\TEMP\Keys\private.asc");EncryptionKeys encryptionKeys = new EncryptionKeys(privateKey, "password");PGP pgp = new PGP(encryptionKeys);// Decryptstring decryptedContent = await pgp.DecryptAsync("String to decrypt");VerifyVerify that the file, stream or string was signed by the matching private key of the counterparty.gpg --verify "C:\TEMP\Content\signed.pgp"Verify File// Load keysFileInfo publicKey = new FileInfo(@"C:\TEMP\Keys\public.asc");EncryptionKeys encryptionKeys = new EncryptionKeys(publicKey);// Reference inputFileInfo inputFile = new FileInfo(@"C:\TEMP\Content\signedContent.pgp");// VerifyPGP pgp = new PGP(encryptionKeys);bool verified = await pgp.VerifyAsync(inputFile);Verify Stream// Load keysEncryptionKeys encryptionKeys;using (Stream publicKeyStream = new FileStream(@"C:\TEMP\Keys\public.asc", FileMode.Open)) encryptionKeys = new EncryptionKeys(publicKeyStream);PGP pgp = new PGP(encryptionKeys);// Reference input filebool verified;using (FileStream inputFileStream = new FileStream(@"C:\TEMP\Content\encryptedContent.pgp", FileMode.Open)) // Verify verified = await pgp.VerifyAsync(inputFileStream);Verify String// Load keysstring publicKey = File.ReadAllText(@"C:\TEMP\Keys\public.asc");EncryptionKeys encryptionKeys = new EncryptionKeys(publicKey);PGP pgp = new PGP(encryptionKeys);// Verifybool verified = await pgp.VerifyAsync("String to verify");Verify and ReadVerify that the file, stream was signed by the matching private key of theFileInfo 2.2 - The Portable Freeware Collection Forums
Unrar.on('progress', (percent: string) => { assert(percent.includes('%')); }); await unrar.uncompress(list[0], dest); // If you want to use a new file name await unrar.uncompress(list[0], dest, { newName: 'test2.txt' }); const data = Deno.readFileSync(uncompressedFile); const txt = decoder.decode(data); assert(txt === 'test'); Deno.removeSync(uncompressedFile);} catch (error) { assert(false);}Definitionsupcompress all; on(event: "progress", listener: (percent: string) => void): this;}export class UnrarAll extends EventEmitter implements UnrarAll {};export default new UnrarAll();">interface Options { command?: string; switches?: string[];}interface UnrarAll { constructor(bin?: string); /** * uncompress .rar file * - `src` source file path * - `dest` destination folder path * - `options` destination folder path * - `command` command of unrar, default: x * - `switches` switches of unrar, default: [] */ async uncompress(src: string, dest: string, options?: Options): Promisevoid>; on(event: "progress", listener: (percent: string) => void): this;}export class UnrarAll extends EventEmitter implements UnrarAll {};export default new UnrarAll();uncompress part; async uncompress(fileInfo: FileInfo, destDir: string, options?: UncompressOptions): Promise; on(event: "progress", listener: (percent: string) => void): this;}">/** * Options for the Unrar constructor. */interface ConstructorOptions { /** * Path to the UnRAR executable. */ bin?: string; /** * Password for the RAR archive. */ password?: string;}/** * Options for the uncompress method. */interface UncompressOptions { /** * New name for the extracted file. */ newName?: string;}interface Unrar { constructor(filepath: string, options?: ConstructorOptions); async list(): PromiseFileInfo[]>; async uncompress(fileInfo: FileInfo, destDir: string, options?: UncompressOptions): Promisevoid>; on(event: "progress", listener: (percent: string) => void): this;}Commands e Extract files without archived paths l[t[a],b] List archive contents [technical[all], bare] p Print file to stdout t Test archive files. Portable FileInfo - X 64-bit Download - x64-bit download - freeware, shareware and software downloads. Portable FileInfo - X 64-bit Download. Link to Us Portable FileInfo 2.4 Portable FileInfo Crack With License Code Free Download [Mac/Win] [April-2025] Portable FileInfo is a simple to use and very useful software that allows you to get to file information ofPGPLib.EncryptFilePBE (FileInfo, String, FileInfo, Boolean) Method
PGP(encryptionKeys);await pgp.SignAsync(inputFile, signedFile);Sign Stream// Load keysEncryptionKeys encryptionKeys;using (Stream privateKeyStream = new FileStream(@"C:\TEMP\Keys\private.asc", FileMode.Open)) encryptionKeys = new EncryptionKeys(privateKeyStream, "password");PGP pgp = new PGP(encryptionKeys);// Reference input/output filesusing (FileStream inputFileStream = new FileStream(@"C:\TEMP\Content\content.txt", FileMode.Open))using (Stream outputFileStream = File.Create(@"C:\TEMP\Content\signed.pgp")) // Sign await pgp.SignAsync(inputFileStream, outputFileStream);Sign String// Load keysstring privateKey = File.ReadAllText(@"C:\TEMP\Keys\private.asc");EncryptionKeys encryptionKeys = new EncryptionKeys(privateKey, "password");PGP pgp = new PGP(encryptionKeys);// Signstring signedContent = await pgp.SignAsync("String to sign");Clear SignClear sign the provided file, stream, or string using a private key so that it is still human readable. A common use of digital signatures is to sign usenet postings or email messages. In such situations it is undesirable to compress the document while signing it. This is because the signature would then depend on the compression algorithm used. This is problematic when different people use different compression algorithms. To overcome this problem, the OpenPGP digital signature format has a special type of signature that is not computed on the message itself. Instead, the signature is computed on a "cleartext" version of the message - a version that is exactly the same as the original message except that it is not compressed and certain types of information (such as the end of line markers) are not included. This cleartext version is then compressed and the signature is appended to the compressed cleartext to produce the final message.gpg --output "C:\TEMP\Content\content.txt" --clearsign "C:\TEMP\Content\clearSigned.pgp"Clear Sign File// Load keysFileInfo privateKey = new FileInfo(@"C:\TEMP\Keys\private.asc");EncryptionKeys encryptionKeys = new EncryptionKeys(privateKey, "password");// Reference input/output filesFileInfo inputFile = new FileInfo(@"C:\TEMP\Content\content.txt");FileInfo signedFile = new FileInfo(@"C:\TEMP\Content\signed.pgp");// SignPGP pgp =Comments
Result = await pgp.InspectAsync(inputFileStream);Inspect String// Load keysstring publicKey = File.ReadAllText(@"C:\TEMP\Keys\public.asc");string privatyeKey = File.ReadAllText(@"C:\TEMP\Keys\private.asc");EncryptionKeys encryptionKeys = new EncryptionKeys(publicKey, privateKey, "password");// InspectPGP pgp = new PGP(encryptionKeys);PgpInspectResult result = await pgp.InspectAsync("String to inspect");EncryptEncrypt the provided file, stream or string using a public key.Optional headers can be provided to include in the encrypted file. These can be set by providing a Dictionary to the headers parameter. The key of the dictionary will be the header name and the value will be the header value.gpg --output "C:\TEMP\Content\encrypted.pgp" --encrypt "C:\TEMP\Content\content.txt"Encrypt File// Load keysFileInfo publicKey = new FileInfo(@"C:\TEMP\Keys\public.asc");EncryptionKeys encryptionKeys = new EncryptionKeys(publicKey);// Reference input/output filesFileInfo inputFile = new FileInfo(@"C:\TEMP\Content\content.txt");FileInfo encryptedFile = new FileInfo(@"C:\TEMP\Content\encrypted.pgp");// EncryptPGP pgp = new PGP(encryptionKeys);await pgp.EncryptAsync(inputFile, encryptedFile);Encrypt Stream// Load keysEncryptionKeys encryptionKeys;using (Stream publicKeyStream = new FileStream(@"C:\TEMP\Keys\public.asc", FileMode.Open)) encryptionKeys = new EncryptionKeys(publicKeyStream);PGP pgp = new PGP(encryptionKeys);// Reference input/output filesusing (FileStream inputFileStream = new FileStream(@"C:\TEMP\Content\content.txt", FileMode.Open))using (Stream outputFileStream = File.Create(@"C:\TEMP\Content\encrypted.pgp")) // Encrypt await pgp.EncryptAsync(inputFileStream, outputFileStream);Encrypt String// Load keysstring publicKey = File.ReadAllText(@"C:\TEMP\Keys\public.asc");EncryptionKeys encryptionKeys = new EncryptionKeys(publicKey);// EncryptPGP pgp = new PGP(encryptionKeys);string encryptedContent = await pgp.EncryptAsync("String to encrypt");SignSign the provided file or stream using a private key.Optional headers can be provided to include in the signed file. These can be set by providing a Dictionary to the headers parameter. The key of the dictionary will be the header name and the value will be the header value.gpg --output "C:\TEMP\Content\content.txt" --sign "C:\TEMP\Content\signed.pgp"Sign File// Load keysFileInfo privateKey = new FileInfo(@"C:\TEMP\Keys\private.asc");EncryptionKeys encryptionKeys = new EncryptionKeys(privateKey, "password");// Reference input/output filesFileInfo inputFile = new FileInfo(@"C:\TEMP\Content\content.txt");FileInfo signedFile = new FileInfo(@"C:\TEMP\Content\signed.pgp");// SignPGP pgp = new
2025-04-10PgpCoreA .NET Core class library for using PGP.This is based on ChoPGP but updated to .NET Standard and to add in a missing utilities class.InstallationTo use PgpCore in your C# project download it from NuGet.Once you have the PgpCore libraries properly referenced in your project, you can include calls to them in your code.Add the following namespaces to use the library:DependenciesPortable.BouncyCastle (>= 1.9.0)UsageThis is intended for usage in projects targeting .NET Standard 2.0.Azure Function ExampleIf you want a (basic) example of how you can use an Azure Function to encrypt/decrypt from Azure Blob Storage I've created a sample project here.MethodsGenerate KeyInspectEncryptSignClear SignEncrypt and SignDecryptVerifyVerify ClearDecrypt and VerifySettingsCompression AlgorithmSymmetric Key AlgorithmPgp Signature TypePublic Key AlgorithmFile TypeHash Algorithm TagGenerate KeyGenerate a new public and private key for the provided username and password.gpg --gen-keyGenerateKeyusing (PGP pgp = new PGP()){ // Generate keys pgp.GenerateKey(new FileInfo(@"C:\TEMP\Keys\public.asc"), new FileInfo(@"C:\TEMP\Keys\private.asc"), "email@email.com", "password");}InspectInspect the provided file, stream or string and return a PGPInspectResult object that contains details on the messages encryption and sign status as well as additional information on filename, headers, etc. where available.gpg --list-packets "C:\TEMP\Content\encrypted.pgp"Inspect File// Load keysFileInfo publicKey = new FileInfo(@"C:\TEMP\Keys\public.asc");FileInfo privateKey = new FileInfo(@"C:\TEMP\Keys\private.asc");EncryptionKeys encryptionKeys = new EncryptionKeys(publicKey, privateKey, "password");// Reference input fileFileInfo inputFile = new FileInfo(@"C:\TEMP\Content\encrypted.pgp");// InspectPGP pgp = new PGP();PgpInspectResult result = await pgp.InspectAsync(inputFile);Inspect Stream// Load keysEncryptionKeys encryptionKeys;using (Stream publicKeyStream = new FileStream(@"C:\TEMP\Keys\public.asc", FileMode.Open))using (Stream privateKeyStream = new FileStream(@"C:\TEMP\Keys\private.asc", FileMode.Open)) encryptionKeys = new EncryptionKeys(publicKeyStream, privateKeyStream, "password");PGP pgp = new PGP(encryptionKeys);// Reference input streamusing (FileStream inputFileStream = new FileStream(@"C:\TEMP\Content\encrypted.pgp", FileMode.Open)) // Inspect PgpInspectResult
2025-04-07Counterparty. This is an overload of the Verify method that takes an additional output argument. Please note that this is not available for the string based method.Verify And Read File// Load keysFileInfo publicKey = new FileInfo(@"C:\TEMP\Keys\public.asc");EncryptionKeys encryptionKeys = new EncryptionKeys(publicKey);// Reference inputFileInfo inputFile = new FileInfo(@"C:\TEMP\Content\signedContent.pgp");FileInfo outputFile = new FileInfo(@"C:\TEMP\Content\decryptedContent.txt");// Verify and readPGP pgp = new PGP(encryptionKeys);bool verified = await pgp.VerifyAsync(inputFile, outputFile);Verify And Read Stream// Load keysEncryptionKeys encryptionKeys;using (Stream publicKeyStream = new FileStream(@"C:\TEMP\Keys\public.asc", FileMode.Open)) encryptionKeys = new EncryptionKeys(publicKeyStream);PGP pgp = new PGP(encryptionKeys);// Reference input filebool verified;using (FileStream inputFileStream = new FileStream(@"C:\TEMP\Content\encryptedContent.pgp", FileMode.Open))using (FileStream outputFileStream = new FileStream(@"C:\TEMP\Content\decryptedContent.pgp", FileMode.Open)) // Verify and read verified = await pgp.VerifyAsync(inputFileStream);Verify And Read String// Load keysstring publicKey = File.ReadAllText(@"C:\TEMP\Keys\public.asc");EncryptionKeys encryptionKeys = new EncryptionKeys(publicKey);PGP pgp = new PGP(encryptionKeys);// Verify and readstring output = string.Empty;bool verified = await pgp.VerifyAsync("String to verify", output);Verify ClearVerify that the clear signed file or stream was signed by the matching private key of the counterparty.gpg --verify "C:\TEMP\Content\clearSigned.pgp"Verify Clear File// Load keysFileInfo publicKey = new FileInfo(@"C:\TEMP\Keys\public.asc");EncryptionKeys encryptionKeys = new EncryptionKeys(publicKey);// Reference inputFileInfo inputFile = new FileInfo(@"C:\TEMP\Content\signedContent.pgp");// VerifyPGP pgp = new PGP(encryptionKeys);bool verified = await pgp.VerifyClearAsync(inputFile);Verify Clear Stream// Load keysEncryptionKeys encryptionKeys;using (Stream publicKeyStream = new FileStream(@"C:\TEMP\Keys\public.asc", FileMode.Open)) encryptionKeys = new EncryptionKeys(publicKeyStream);PGP pgp = new PGP(encryptionKeys);// Reference input filebool verified;using (FileStream inputFileStream = new FileStream(@"C:\TEMP\Content\encryptedContent.pgp", FileMode.Open)) // Verify verified = await pgp.VerifyClearAsync(inputFileStream);Verify Clear String// Load keysstring publicKey = File.ReadAllText(@"C:\TEMP\Keys\public.asc");EncryptionKeys encryptionKeys = new EncryptionKeys(publicKey);PGP pgp = new PGP(encryptionKeys);// Verifybool verified = await pgp.VerifyClearAsync("String to verify");Verify and Read ClearVerify that the clear signed file or stream was
2025-04-22