| @@ -0,0 +1,75 @@ | |||
| { | |||
| "Version": 1, | |||
| "WorkspaceRootPath": "C:\\Users\\christophe_brachet\\Desktop\\Code\\SecureData\\", | |||
| "Documents": [ | |||
| { | |||
| "AbsoluteMoniker": "D:0:0:{2D774D30-4507-4135-A8C1-2E60C43FDB02}|SecureData\\SecureData.csproj|c:\\users\\christophe_brachet\\desktop\\code\\securedata\\securedata\\managers\\safeorbitpgpcryptomanager.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", | |||
| "RelativeMoniker": "D:0:0:{2D774D30-4507-4135-A8C1-2E60C43FDB02}|SecureData\\SecureData.csproj|solutionrelative:securedata\\managers\\safeorbitpgpcryptomanager.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" | |||
| }, | |||
| { | |||
| "AbsoluteMoniker": "D:0:0:{2D774D30-4507-4135-A8C1-2E60C43FDB02}|SecureData\\SecureData.csproj|c:\\users\\christophe_brachet\\desktop\\code\\securedata\\securedata\\data\\protecteddata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", | |||
| "RelativeMoniker": "D:0:0:{2D774D30-4507-4135-A8C1-2E60C43FDB02}|SecureData\\SecureData.csproj|solutionrelative:securedata\\data\\protecteddata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" | |||
| }, | |||
| { | |||
| "AbsoluteMoniker": "D:0:0:{2D774D30-4507-4135-A8C1-2E60C43FDB02}|SecureData\\SecureData.csproj|c:\\users\\christophe_brachet\\desktop\\code\\securedata\\securedata\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", | |||
| "RelativeMoniker": "D:0:0:{2D774D30-4507-4135-A8C1-2E60C43FDB02}|SecureData\\SecureData.csproj|solutionrelative:securedata\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" | |||
| } | |||
| ], | |||
| "DocumentGroupContainers": [ | |||
| { | |||
| "Orientation": 0, | |||
| "VerticalTabListWidth": 256, | |||
| "DocumentGroups": [ | |||
| { | |||
| "DockedWidth": 200, | |||
| "SelectedChildIndex": 2, | |||
| "Children": [ | |||
| { | |||
| "$type": "Bookmark", | |||
| "Name": "ST:0:0:{cce594b6-0c39-4442-ba28-10c64ac7e89f}" | |||
| }, | |||
| { | |||
| "$type": "Document", | |||
| "DocumentIndex": 1, | |||
| "Title": "ProtectedData.cs", | |||
| "DocumentMoniker": "C:\\Users\\christophe_brachet\\Desktop\\Code\\SecureData\\SecureData\\Data\\ProtectedData.cs", | |||
| "RelativeDocumentMoniker": "SecureData\\Data\\ProtectedData.cs", | |||
| "ToolTip": "C:\\Users\\christophe_brachet\\Desktop\\Code\\SecureData\\SecureData\\Data\\ProtectedData.cs", | |||
| "RelativeToolTip": "SecureData\\Data\\ProtectedData.cs", | |||
| "ViewState": "AgIAAAAAAAAAAAAAAAAuwA0AAAAsAAAAAAAAAA==", | |||
| "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", | |||
| "WhenOpened": "2025-06-02T23:41:29.675Z", | |||
| "EditorCaption": "" | |||
| }, | |||
| { | |||
| "$type": "Document", | |||
| "DocumentIndex": 0, | |||
| "Title": "SafeOrbitPGPCryptoManager.cs", | |||
| "DocumentMoniker": "C:\\Users\\christophe_brachet\\Desktop\\Code\\SecureData\\SecureData\\Managers\\SafeOrbitPGPCryptoManager.cs", | |||
| "RelativeDocumentMoniker": "SecureData\\Managers\\SafeOrbitPGPCryptoManager.cs", | |||
| "ToolTip": "C:\\Users\\christophe_brachet\\Desktop\\Code\\SecureData\\SecureData\\Managers\\SafeOrbitPGPCryptoManager.cs", | |||
| "RelativeToolTip": "SecureData\\Managers\\SafeOrbitPGPCryptoManager.cs", | |||
| "ViewState": "AgIAAKQAAAAAAAAAAAAUwM0AAABtAAAAAAAAAA==", | |||
| "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", | |||
| "WhenOpened": "2025-06-02T22:19:21.625Z", | |||
| "EditorCaption": "" | |||
| }, | |||
| { | |||
| "$type": "Document", | |||
| "DocumentIndex": 2, | |||
| "Title": "Program.cs", | |||
| "DocumentMoniker": "C:\\Users\\christophe_brachet\\Desktop\\Code\\SecureData\\SecureData\\Program.cs", | |||
| "RelativeDocumentMoniker": "SecureData\\Program.cs", | |||
| "ToolTip": "C:\\Users\\christophe_brachet\\Desktop\\Code\\SecureData\\SecureData\\Program.cs", | |||
| "RelativeToolTip": "SecureData\\Program.cs", | |||
| "ViewState": "AgIAAAAAAAAAAAAAAAAAAB8AAAAoAAAAAAAAAA==", | |||
| "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", | |||
| "WhenOpened": "2025-06-02T22:15:07.853Z", | |||
| "EditorCaption": "" | |||
| } | |||
| ] | |||
| } | |||
| ] | |||
| } | |||
| ] | |||
| } | |||
| @@ -0,0 +1,75 @@ | |||
| { | |||
| "Version": 1, | |||
| "WorkspaceRootPath": "C:\\Users\\christophe_brachet\\Desktop\\Code\\SecureData\\", | |||
| "Documents": [ | |||
| { | |||
| "AbsoluteMoniker": "D:0:0:{2D774D30-4507-4135-A8C1-2E60C43FDB02}|SecureData\\SecureData.csproj|c:\\users\\christophe_brachet\\desktop\\code\\securedata\\securedata\\managers\\safeorbitpgpcryptomanager.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", | |||
| "RelativeMoniker": "D:0:0:{2D774D30-4507-4135-A8C1-2E60C43FDB02}|SecureData\\SecureData.csproj|solutionrelative:securedata\\managers\\safeorbitpgpcryptomanager.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" | |||
| }, | |||
| { | |||
| "AbsoluteMoniker": "D:0:0:{2D774D30-4507-4135-A8C1-2E60C43FDB02}|SecureData\\SecureData.csproj|c:\\users\\christophe_brachet\\desktop\\code\\securedata\\securedata\\data\\protecteddata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", | |||
| "RelativeMoniker": "D:0:0:{2D774D30-4507-4135-A8C1-2E60C43FDB02}|SecureData\\SecureData.csproj|solutionrelative:securedata\\data\\protecteddata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" | |||
| }, | |||
| { | |||
| "AbsoluteMoniker": "D:0:0:{2D774D30-4507-4135-A8C1-2E60C43FDB02}|SecureData\\SecureData.csproj|c:\\users\\christophe_brachet\\desktop\\code\\securedata\\securedata\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", | |||
| "RelativeMoniker": "D:0:0:{2D774D30-4507-4135-A8C1-2E60C43FDB02}|SecureData\\SecureData.csproj|solutionrelative:securedata\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" | |||
| } | |||
| ], | |||
| "DocumentGroupContainers": [ | |||
| { | |||
| "Orientation": 0, | |||
| "VerticalTabListWidth": 256, | |||
| "DocumentGroups": [ | |||
| { | |||
| "DockedWidth": 200, | |||
| "SelectedChildIndex": 2, | |||
| "Children": [ | |||
| { | |||
| "$type": "Bookmark", | |||
| "Name": "ST:0:0:{cce594b6-0c39-4442-ba28-10c64ac7e89f}" | |||
| }, | |||
| { | |||
| "$type": "Document", | |||
| "DocumentIndex": 1, | |||
| "Title": "ProtectedData.cs", | |||
| "DocumentMoniker": "C:\\Users\\christophe_brachet\\Desktop\\Code\\SecureData\\SecureData\\Data\\ProtectedData.cs", | |||
| "RelativeDocumentMoniker": "SecureData\\Data\\ProtectedData.cs", | |||
| "ToolTip": "C:\\Users\\christophe_brachet\\Desktop\\Code\\SecureData\\SecureData\\Data\\ProtectedData.cs", | |||
| "RelativeToolTip": "SecureData\\Data\\ProtectedData.cs", | |||
| "ViewState": "AgIAAAAAAAAAAAAAAAAuwA0AAAAsAAAAAAAAAA==", | |||
| "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", | |||
| "WhenOpened": "2025-06-02T23:41:29.675Z", | |||
| "EditorCaption": "" | |||
| }, | |||
| { | |||
| "$type": "Document", | |||
| "DocumentIndex": 0, | |||
| "Title": "SafeOrbitPGPCryptoManager.cs", | |||
| "DocumentMoniker": "C:\\Users\\christophe_brachet\\Desktop\\Code\\SecureData\\SecureData\\Managers\\SafeOrbitPGPCryptoManager.cs", | |||
| "RelativeDocumentMoniker": "SecureData\\Managers\\SafeOrbitPGPCryptoManager.cs", | |||
| "ToolTip": "C:\\Users\\christophe_brachet\\Desktop\\Code\\SecureData\\SecureData\\Managers\\SafeOrbitPGPCryptoManager.cs", | |||
| "RelativeToolTip": "SecureData\\Managers\\SafeOrbitPGPCryptoManager.cs", | |||
| "ViewState": "AgIAAJcAAAAAAAAAAAAqwMoAAAAaAAAAAAAAAA==", | |||
| "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", | |||
| "WhenOpened": "2025-06-02T22:19:21.625Z", | |||
| "EditorCaption": "" | |||
| }, | |||
| { | |||
| "$type": "Document", | |||
| "DocumentIndex": 2, | |||
| "Title": "Program.cs", | |||
| "DocumentMoniker": "C:\\Users\\christophe_brachet\\Desktop\\Code\\SecureData\\SecureData\\Program.cs", | |||
| "RelativeDocumentMoniker": "SecureData\\Program.cs", | |||
| "ToolTip": "C:\\Users\\christophe_brachet\\Desktop\\Code\\SecureData\\SecureData\\Program.cs", | |||
| "RelativeToolTip": "SecureData\\Program.cs", | |||
| "ViewState": "AgIAAAAAAAAAAAAAAAAAAB8AAAAoAAAAAAAAAA==", | |||
| "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", | |||
| "WhenOpened": "2025-06-02T22:15:07.853Z", | |||
| "EditorCaption": "" | |||
| } | |||
| ] | |||
| } | |||
| ] | |||
| } | |||
| ] | |||
| } | |||
| @@ -0,0 +1,22 @@ | |||
| | |||
| Microsoft Visual Studio Solution File, Format Version 12.00 | |||
| # Visual Studio Version 17 | |||
| VisualStudioVersion = 17.12.35506.116 d17.12 | |||
| MinimumVisualStudioVersion = 10.0.40219.1 | |||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SecureData", "SecureData\SecureData.csproj", "{2D774D30-4507-4135-A8C1-2E60C43FDB02}" | |||
| EndProject | |||
| Global | |||
| GlobalSection(SolutionConfigurationPlatforms) = preSolution | |||
| Debug|Any CPU = Debug|Any CPU | |||
| Release|Any CPU = Release|Any CPU | |||
| EndGlobalSection | |||
| GlobalSection(ProjectConfigurationPlatforms) = postSolution | |||
| {2D774D30-4507-4135-A8C1-2E60C43FDB02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||
| {2D774D30-4507-4135-A8C1-2E60C43FDB02}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||
| {2D774D30-4507-4135-A8C1-2E60C43FDB02}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||
| {2D774D30-4507-4135-A8C1-2E60C43FDB02}.Release|Any CPU.Build.0 = Release|Any CPU | |||
| EndGlobalSection | |||
| GlobalSection(SolutionProperties) = preSolution | |||
| HideSolutionNode = FALSE | |||
| EndGlobalSection | |||
| EndGlobal | |||
| @@ -0,0 +1,17 @@ | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| using System.Text; | |||
| using System.Threading.Tasks; | |||
| using SafeOrbit.Memory; | |||
| namespace SecureData.Data | |||
| { | |||
| public class ProtectedData | |||
| { | |||
| public string Password { get; set; } | |||
| public string Passphrase { get; set; } | |||
| } | |||
| } | |||
| @@ -0,0 +1,224 @@ | |||
| | |||
| using System; | |||
| using System.IO; | |||
| using Org.BouncyCastle.Bcpg; | |||
| using Org.BouncyCastle.Bcpg.OpenPgp; | |||
| using Org.BouncyCastle.Crypto.Generators; | |||
| using Org.BouncyCastle.Crypto; | |||
| using Org.BouncyCastle.Security; | |||
| using SafeOrbit.Memory; | |||
| using Org.BouncyCastle.Bcpg.Sig; | |||
| using Org.BouncyCastle.Asn1.Ocsp; | |||
| using System.Security.Cryptography; | |||
| using ProtectedData = SecureData.Data.ProtectedData; | |||
| using System.Runtime.Serialization; | |||
| using System.Text; | |||
| using static System.Runtime.InteropServices.JavaScript.JSType; | |||
| using System.Security.Cryptography.X509Certificates; | |||
| namespace SecureData.Managers | |||
| { | |||
| public class SafeOrbitPGPCryptoManager | |||
| { | |||
| public string PublicKeyFile { get; private set; } | |||
| public string PrivateKeyFile { get; private set; } | |||
| public SafeOrbitPGPCryptoManager(string publicKeyPath, string privateKeyPath) | |||
| { | |||
| PublicKeyFile = publicKeyPath; | |||
| PrivateKeyFile = privateKeyPath; | |||
| } | |||
| public void GenerateKeys(string identity, string passphrase) | |||
| { | |||
| PgpKeyRingGenerator keyRingGenerator = CreatePGPKeyRingGenerator(identity, passphrase); | |||
| using (Stream pubOut = File.Create(PublicKeyFile)) | |||
| using (Stream privOut = File.Create(PrivateKeyFile)) | |||
| { | |||
| keyRingGenerator.GeneratePublicKeyRing().Encode(pubOut); | |||
| keyRingGenerator.GenerateSecretKeyRing().Encode(privOut); | |||
| } | |||
| Console.WriteLine("✅ Clés PGP générées avec succès !"); | |||
| } | |||
| public void EncryptPassword(SafeObject<ProtectedData> safeData, string encryptedFile) | |||
| { | |||
| using (Stream keyIn = File.OpenRead(PublicKeyFile)) | |||
| using (Stream outputStream = File.Create(encryptedFile)) | |||
| using (Stream inputStream = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(safeData.Object.Password))) | |||
| { | |||
| PgpPublicKey pubKey = ReadPublicKey(keyIn); | |||
| PgpEncryptedDataGenerator encryptor = new PgpEncryptedDataGenerator(SymmetricKeyAlgorithmTag.Aes256); | |||
| encryptor.AddMethod(pubKey); | |||
| using (Stream encryptedOut = encryptor.Open(outputStream, new byte[1 << 16])) | |||
| { | |||
| inputStream.CopyTo(encryptedOut); | |||
| } | |||
| } | |||
| Console.WriteLine("🔐 Mot de passe chiffré avec succès !"); | |||
| } | |||
| public string? DecryptPassword(string encryptedFile, string passphrase) | |||
| { | |||
| using (Stream keyIn = File.OpenRead(PrivateKeyFile)) | |||
| using (Stream encryptedStream = File.OpenRead(encryptedFile)) | |||
| { | |||
| PgpSecretKeyRingBundle secretKeyRingBundle = new PgpSecretKeyRingBundle(PgpUtilities.GetDecoderStream(keyIn)); | |||
| PgpObjectFactory pgpF = new PgpObjectFactory(PgpUtilities.GetDecoderStream(encryptedStream)); | |||
| PgpEncryptedDataList? encDataList = pgpF.NextPgpObject() as PgpEncryptedDataList; | |||
| PgpPrivateKey privateKey = FindPrivateKey(secretKeyRingBundle, passphrase); | |||
| if (encDataList?.Count == 1) | |||
| { | |||
| using (Stream decryptedStream = ((PgpPublicKeyEncryptedData)encDataList[0]).GetDataStream(privateKey)) | |||
| using (StreamReader reader = new StreamReader(decryptedStream)) | |||
| { | |||
| return reader.ReadToEnd(); | |||
| } | |||
| } | |||
| return null; | |||
| } | |||
| } | |||
| public void SignData(SafeObject<ProtectedData> safeData, string signedFile, string password) | |||
| { | |||
| using (Stream keyIn = File.OpenRead(PrivateKeyFile)) | |||
| using (Stream inputStream = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(safeData.Object.Passphrase))) | |||
| using (Stream outputStream = File.Create(signedFile)) | |||
| using (MemoryStream signedOut = new MemoryStream()) | |||
| { | |||
| PgpSecretKeyRingBundle secretKeyRingBundle = new PgpSecretKeyRingBundle(PgpUtilities.GetDecoderStream(keyIn)); | |||
| PgpPrivateKey privateKey = FindPrivateKey(secretKeyRingBundle, password); | |||
| PgpSignatureGenerator sGen = new PgpSignatureGenerator(privateKey.PublicKeyPacket.Algorithm, HashAlgorithmTag.Sha256); | |||
| sGen.InitSign(PgpSignature.BinaryDocument, privateKey); | |||
| Console.WriteLine("🔍 Initializing signature..."); | |||
| sGen.GenerateOnePassVersion(false).Encode(signedOut); | |||
| inputStream.CopyTo(signedOut); | |||
| sGen.Generate().Encode(signedOut); | |||
| Console.WriteLine("🔍 Copying to output file..."); | |||
| signedOut.Flush(); | |||
| signedOut.Position = 0; | |||
| signedOut.CopyTo(outputStream); | |||
| outputStream.Flush(); | |||
| } | |||
| Console.WriteLine("✅ Données signées avec succès !"); | |||
| } | |||
| private PgpKeyRingGenerator CreatePGPKeyRingGenerator(string identity, string passphrase) | |||
| { | |||
| int certificationLevel = PgpSignature.PositiveCertification; | |||
| PgpKeyPair masterKeyPair = GeneratePGPKeyPair(PublicKeyAlgorithmTag.RsaGeneral, 2048); | |||
| PgpKeyPair subKeyPair = GeneratePGPKeyPair(PublicKeyAlgorithmTag.RsaGeneral, 2048); | |||
| // ✅ Creating the hashed signature packets | |||
| PgpSignatureSubpacketGenerator hashedSubpacketGenerator = new PgpSignatureSubpacketGenerator(); | |||
| hashedSubpacketGenerator.SetKeyFlags(true, KeyFlags.SignData | KeyFlags.EncryptStorage); | |||
| hashedSubpacketGenerator.SetPreferredHashAlgorithms(true, new int[] { (int)HashAlgorithmTag.Sha256, (int)HashAlgorithmTag.Sha512 }); | |||
| PgpSignatureSubpacketVector hashedPackets = hashedSubpacketGenerator.Generate(); | |||
| // ✅ Creating the unhashed signature packets (optional metadata) | |||
| PgpSignatureSubpacketGenerator unhashedSubpacketGenerator = new PgpSignatureSubpacketGenerator(); | |||
| PgpSignatureSubpacketVector unhashedPackets = unhashedSubpacketGenerator.Generate(); | |||
| SecureRandom rand = new SecureRandom(); | |||
| return new PgpKeyRingGenerator( | |||
| certificationLevel, | |||
| masterKeyPair, | |||
| identity, | |||
| SymmetricKeyAlgorithmTag.Aes256, | |||
| passphrase.ToCharArray(), | |||
| true, // useSha1 | |||
| hashedPackets, | |||
| unhashedPackets, | |||
| rand | |||
| ); | |||
| } | |||
| private PgpKeyPair GeneratePGPKeyPair(PublicKeyAlgorithmTag algorithm, int keySize) | |||
| { | |||
| RsaKeyPairGenerator keyGen = new RsaKeyPairGenerator(); | |||
| keyGen.Init(new KeyGenerationParameters(new SecureRandom(), keySize)); | |||
| AsymmetricCipherKeyPair keyPair = keyGen.GenerateKeyPair(); | |||
| return new PgpKeyPair(algorithm, keyPair.Public, keyPair.Private, DateTime.UtcNow); | |||
| } | |||
| private PgpPublicKey ReadPublicKey(Stream inputStream) | |||
| { | |||
| PgpPublicKeyRingBundle keyRingBundle = new PgpPublicKeyRingBundle(PgpUtilities.GetDecoderStream(inputStream)); | |||
| foreach (PgpPublicKeyRing keyRing in keyRingBundle.GetKeyRings()) | |||
| { | |||
| foreach (PgpPublicKey key in keyRing.GetPublicKeys()) | |||
| { | |||
| if (key.IsEncryptionKey) | |||
| return key; | |||
| } | |||
| } | |||
| throw new ArgumentException("Clé publique non trouvée."); | |||
| } | |||
| private PgpSignature LoadPGPSignature(PgpPublicKey publicKey,string signatureFilePath) | |||
| { | |||
| using (Stream keyIn = File.OpenRead(signatureFilePath)) | |||
| { | |||
| PgpObjectFactory factory = new PgpObjectFactory(PgpUtilities.GetDecoderStream(keyIn)); | |||
| object obj =factory.NextPgpObject(); | |||
| return null; | |||
| } | |||
| } | |||
| public bool VerifySignature(string signatureFilePath, SafeObject<ProtectedData> safeData) | |||
| { | |||
| byte[] data = System.Text.Encoding.UTF8.GetBytes(safeData.Object.Passphrase); | |||
| using (Stream keyIn = File.OpenRead(PublicKeyFile)) | |||
| { | |||
| PgpPublicKey publicKey= ReadPublicKey(keyIn); | |||
| PgpSignature signature = LoadPGPSignature(publicKey,signatureFilePath); | |||
| signature.InitVerify(publicKey); | |||
| using (Stream dataStream = new MemoryStream(data)) | |||
| { | |||
| int ch; | |||
| while ((ch = dataStream.ReadByte()) >= 0) | |||
| { | |||
| signature.Update((byte)ch); | |||
| } | |||
| } | |||
| return signature.Verify(); | |||
| } | |||
| return false; | |||
| } | |||
| private PgpPrivateKey FindPrivateKey(PgpSecretKeyRingBundle secretKeyRingBundle, string passphrase) | |||
| { | |||
| foreach (PgpSecretKeyRing keyRing in secretKeyRingBundle.GetKeyRings()) | |||
| { | |||
| foreach (PgpSecretKey key in keyRing.GetSecretKeys()) | |||
| { | |||
| PgpPrivateKey privateKey = key.ExtractPrivateKey(passphrase.ToCharArray()); | |||
| if (privateKey != null) | |||
| return privateKey; | |||
| } | |||
| } | |||
| throw new ArgumentException("Clé privée non trouvée."); | |||
| } | |||
| } | |||
| } | |||
| @@ -0,0 +1,63 @@ | |||
| using System; | |||
| using System.Security.Cryptography; | |||
| using SafeOrbit.Memory; | |||
| using SecureData.Data; | |||
| using SecureData.Managers; | |||
| using ProtectedData = SecureData.Data.ProtectedData; | |||
| namespace SecureData | |||
| { | |||
| class Program | |||
| { | |||
| static async Task Main() | |||
| { | |||
| string signedFile = "signed.pgp"; | |||
| SafeOrbitPGPCryptoManager pgp = new SafeOrbitPGPCryptoManager("publicKey.asc", "privateKey.asc"); | |||
| pgp.GenerateKeys("user@example.com", "MonMotDePasseUltraSecret"); | |||
| using (SafeObject<ProtectedData> safeObject = new SafeObject<ProtectedData>()) | |||
| { | |||
| safeObject.ApplyChanges((data) => data.Password = "MonMotDePasseChiffré"); | |||
| safeObject.ApplyChanges((data) => data.Passphrase = "4UGy8Xps982H7JpXjmVM"); | |||
| pgp.SignData(safeObject,signedFile, "MonMotDePasseUltraSecret"); | |||
| // You can alternatively use an existing instance to protect: new SafeObject(new InitialSafeObjectSettings(initialValue, true)); | |||
| // Each change to the object's state or code must be using ApplyChanges | |||
| if (pgp.VerifySignature(signedFile,safeObject)) | |||
| { | |||
| string encryptedFile = "password.pgp"; | |||
| pgp.EncryptPassword(safeObject, encryptedFile); | |||
| string? decryptedPassword = pgp.DecryptPassword(encryptedFile, "MonMotDePasseUltraSecret"); | |||
| } | |||
| } | |||
| /* string safePassword = "MonMotDePasseSuperSecret"; | |||
| pgp.EncryptPassword(safePassword, encryptedFile); | |||
| string? decryptedPassword = pgp.DecryptPassword(encryptedFile, "MonMotDePasseUltraSecret"); | |||
| Console.WriteLine($"✅ Mot de passe déchiffré : {decryptedPassword}"); | |||
| using (var safeMessage = new SafeString()) | |||
| { | |||
| safePassword.AppendAsync("Message Important à Signer").GetAwaiter().GetResult(); | |||
| pgp.SignData(safeMessage, "signedMessage.pgp", "MonMotDePasseUltraSecret"); | |||
| } | |||
| }*/ | |||
| } | |||
| } | |||
| } | |||
| @@ -0,0 +1,15 @@ | |||
| <Project Sdk="Microsoft.NET.Sdk"> | |||
| <PropertyGroup> | |||
| <OutputType>Exe</OutputType> | |||
| <TargetFramework>net8.0</TargetFramework> | |||
| <ImplicitUsings>enable</ImplicitUsings> | |||
| <Nullable>enable</Nullable> | |||
| </PropertyGroup> | |||
| <ItemGroup> | |||
| <PackageReference Include="BouncyCastle.Cryptography" Version="2.6.1" /> | |||
| <PackageReference Include="SafeOrbit" Version="0.3.1" /> | |||
| </ItemGroup> | |||
| </Project> | |||
| @@ -0,0 +1,4 @@ | |||
| // <autogenerated /> | |||
| using System; | |||
| using System.Reflection; | |||
| [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")] | |||
| @@ -0,0 +1,23 @@ | |||
| //------------------------------------------------------------------------------ | |||
| // <auto-generated> | |||
| // Ce code a été généré par un outil. | |||
| // Version du runtime :4.0.30319.42000 | |||
| // | |||
| // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si | |||
| // le code est régénéré. | |||
| // </auto-generated> | |||
| //------------------------------------------------------------------------------ | |||
| using System; | |||
| using System.Reflection; | |||
| [assembly: System.Reflection.AssemblyCompanyAttribute("SecureData")] | |||
| [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] | |||
| [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] | |||
| [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] | |||
| [assembly: System.Reflection.AssemblyProductAttribute("SecureData")] | |||
| [assembly: System.Reflection.AssemblyTitleAttribute("SecureData")] | |||
| [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] | |||
| // Généré par la classe MSBuild WriteCodeFragment. | |||
| @@ -0,0 +1 @@ | |||
| a2bc125f6230c65ee2d34f8d5a9c02a956dd60c951e56adf81c4e11bed7f88e9 | |||
| @@ -0,0 +1,15 @@ | |||
| is_global = true | |||
| build_property.TargetFramework = net8.0 | |||
| build_property.TargetPlatformMinVersion = | |||
| build_property.UsingMicrosoftNETSdkWeb = | |||
| build_property.ProjectTypeGuids = | |||
| build_property.InvariantGlobalization = | |||
| build_property.PlatformNeutralAssembly = | |||
| build_property.EnforceExtendedAnalyzerRules = | |||
| build_property._SupportedPlatformList = Linux,macOS,Windows | |||
| build_property.RootNamespace = SecureData | |||
| build_property.ProjectDir = C:\Users\christophe_brachet\Desktop\Code\SecureData\SecureData\ | |||
| build_property.EnableComHosting = | |||
| build_property.EnableGeneratedComInterfaceComImportInterop = | |||
| build_property.EffectiveAnalysisLevelStyle = 8.0 | |||
| build_property.EnableCodeStyleSeverity = | |||
| @@ -0,0 +1,8 @@ | |||
| // <auto-generated/> | |||
| global using global::System; | |||
| global using global::System.Collections.Generic; | |||
| global using global::System.IO; | |||
| global using global::System.Linq; | |||
| global using global::System.Net.Http; | |||
| global using global::System.Threading; | |||
| global using global::System.Threading.Tasks; | |||
| @@ -0,0 +1 @@ | |||
| bfb0d2eaf623f257f2d8763c7d702b6086cf32acbbe82b1dcc4de7cdcb997b4a | |||
| @@ -0,0 +1,28 @@ | |||
| C:\Users\christophe_brachet\Desktop\Code\SecureData\SecureData\obj\Debug\net8.0\SecureData.csproj.AssemblyReference.cache | |||
| C:\Users\christophe_brachet\Desktop\Code\SecureData\SecureData\obj\Debug\net8.0\SecureData.GeneratedMSBuildEditorConfig.editorconfig | |||
| C:\Users\christophe_brachet\Desktop\Code\SecureData\SecureData\obj\Debug\net8.0\SecureData.AssemblyInfoInputs.cache | |||
| C:\Users\christophe_brachet\Desktop\Code\SecureData\SecureData\obj\Debug\net8.0\SecureData.AssemblyInfo.cs | |||
| C:\Users\christophe_brachet\Desktop\Code\SecureData\SecureData\obj\Debug\net8.0\SecureData.csproj.CoreCompileInputs.cache | |||
| C:\Users\christophe_brachet\Desktop\Code\SecureData\SecureData\bin\Debug\net8.0\SecureData.exe | |||
| C:\Users\christophe_brachet\Desktop\Code\SecureData\SecureData\bin\Debug\net8.0\SecureData.deps.json | |||
| C:\Users\christophe_brachet\Desktop\Code\SecureData\SecureData\bin\Debug\net8.0\SecureData.runtimeconfig.json | |||
| C:\Users\christophe_brachet\Desktop\Code\SecureData\SecureData\bin\Debug\net8.0\SecureData.dll | |||
| C:\Users\christophe_brachet\Desktop\Code\SecureData\SecureData\bin\Debug\net8.0\SecureData.pdb | |||
| C:\Users\christophe_brachet\Desktop\Code\SecureData\SecureData\bin\Debug\net8.0\BouncyCastle.Cryptography.dll | |||
| C:\Users\christophe_brachet\Desktop\Code\SecureData\SecureData\bin\Debug\net8.0\Microsoft.Win32.SystemEvents.dll | |||
| C:\Users\christophe_brachet\Desktop\Code\SecureData\SecureData\bin\Debug\net8.0\SafeOrbit.dll | |||
| C:\Users\christophe_brachet\Desktop\Code\SecureData\SecureData\bin\Debug\net8.0\System.Drawing.Common.dll | |||
| C:\Users\christophe_brachet\Desktop\Code\SecureData\SecureData\bin\Debug\net8.0\System.Security.Cryptography.ProtectedData.dll | |||
| C:\Users\christophe_brachet\Desktop\Code\SecureData\SecureData\bin\Debug\net8.0\System.Security.Permissions.dll | |||
| C:\Users\christophe_brachet\Desktop\Code\SecureData\SecureData\bin\Debug\net8.0\System.Windows.Extensions.dll | |||
| C:\Users\christophe_brachet\Desktop\Code\SecureData\SecureData\bin\Debug\net8.0\runtimes\win\lib\netcoreapp3.0\Microsoft.Win32.SystemEvents.dll | |||
| C:\Users\christophe_brachet\Desktop\Code\SecureData\SecureData\bin\Debug\net8.0\runtimes\unix\lib\netcoreapp3.0\System.Drawing.Common.dll | |||
| C:\Users\christophe_brachet\Desktop\Code\SecureData\SecureData\bin\Debug\net8.0\runtimes\win\lib\netcoreapp3.0\System.Drawing.Common.dll | |||
| C:\Users\christophe_brachet\Desktop\Code\SecureData\SecureData\bin\Debug\net8.0\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll | |||
| C:\Users\christophe_brachet\Desktop\Code\SecureData\SecureData\bin\Debug\net8.0\runtimes\win\lib\netcoreapp3.0\System.Windows.Extensions.dll | |||
| C:\Users\christophe_brachet\Desktop\Code\SecureData\SecureData\obj\Debug\net8.0\SecureData.csproj.Up2Date | |||
| C:\Users\christophe_brachet\Desktop\Code\SecureData\SecureData\obj\Debug\net8.0\SecureData.dll | |||
| C:\Users\christophe_brachet\Desktop\Code\SecureData\SecureData\obj\Debug\net8.0\refint\SecureData.dll | |||
| C:\Users\christophe_brachet\Desktop\Code\SecureData\SecureData\obj\Debug\net8.0\SecureData.pdb | |||
| C:\Users\christophe_brachet\Desktop\Code\SecureData\SecureData\obj\Debug\net8.0\SecureData.genruntimeconfig.cache | |||
| C:\Users\christophe_brachet\Desktop\Code\SecureData\SecureData\obj\Debug\net8.0\ref\SecureData.dll | |||
| @@ -0,0 +1 @@ | |||
| c6946be347bc8af8cb4c1c175314b6a51599f7992a787b82fd8a7ef0655af4fb | |||
| @@ -0,0 +1,84 @@ | |||
| { | |||
| "format": 1, | |||
| "restore": { | |||
| "C:\\Users\\christophe_brachet\\Desktop\\Code\\SecureData\\SecureData\\SecureData.csproj": {} | |||
| }, | |||
| "projects": { | |||
| "C:\\Users\\christophe_brachet\\Desktop\\Code\\SecureData\\SecureData\\SecureData.csproj": { | |||
| "version": "1.0.0", | |||
| "restore": { | |||
| "projectUniqueName": "C:\\Users\\christophe_brachet\\Desktop\\Code\\SecureData\\SecureData\\SecureData.csproj", | |||
| "projectName": "SecureData", | |||
| "projectPath": "C:\\Users\\christophe_brachet\\Desktop\\Code\\SecureData\\SecureData\\SecureData.csproj", | |||
| "packagesPath": "C:\\Users\\christophe_brachet\\.nuget\\packages\\", | |||
| "outputPath": "C:\\Users\\christophe_brachet\\Desktop\\Code\\SecureData\\SecureData\\obj\\", | |||
| "projectStyle": "PackageReference", | |||
| "fallbackFolders": [ | |||
| "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" | |||
| ], | |||
| "configFilePaths": [ | |||
| "C:\\Users\\christophe_brachet\\AppData\\Roaming\\NuGet\\NuGet.Config", | |||
| "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", | |||
| "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" | |||
| ], | |||
| "originalTargetFrameworks": [ | |||
| "net8.0" | |||
| ], | |||
| "sources": { | |||
| "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, | |||
| "C:\\Program Files\\dotnet\\library-packs": {}, | |||
| "https://api.nuget.org/v3/index.json": {} | |||
| }, | |||
| "frameworks": { | |||
| "net8.0": { | |||
| "targetAlias": "net8.0", | |||
| "projectReferences": {} | |||
| } | |||
| }, | |||
| "warningProperties": { | |||
| "warnAsError": [ | |||
| "NU1605" | |||
| ] | |||
| }, | |||
| "restoreAuditProperties": { | |||
| "enableAudit": "true", | |||
| "auditLevel": "low", | |||
| "auditMode": "all" | |||
| }, | |||
| "SdkAnalysisLevel": "9.0.100" | |||
| }, | |||
| "frameworks": { | |||
| "net8.0": { | |||
| "targetAlias": "net8.0", | |||
| "dependencies": { | |||
| "BouncyCastle.Cryptography": { | |||
| "target": "Package", | |||
| "version": "[2.6.1, )" | |||
| }, | |||
| "SafeOrbit": { | |||
| "target": "Package", | |||
| "version": "[0.3.1, )" | |||
| } | |||
| }, | |||
| "imports": [ | |||
| "net461", | |||
| "net462", | |||
| "net47", | |||
| "net471", | |||
| "net472", | |||
| "net48", | |||
| "net481" | |||
| ], | |||
| "assetTargetFallback": true, | |||
| "warn": true, | |||
| "frameworkReferences": { | |||
| "Microsoft.NETCore.App": { | |||
| "privateAssets": "all" | |||
| } | |||
| }, | |||
| "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.100/PortableRuntimeIdentifierGraph.json" | |||
| } | |||
| } | |||
| } | |||
| } | |||
| } | |||
| @@ -0,0 +1,16 @@ | |||
| <?xml version="1.0" encoding="utf-8" standalone="no"?> | |||
| <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
| <PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' "> | |||
| <RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess> | |||
| <RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool> | |||
| <ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile> | |||
| <NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot> | |||
| <NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\christophe_brachet\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders> | |||
| <NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle> | |||
| <NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.12.1</NuGetToolVersion> | |||
| </PropertyGroup> | |||
| <ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' "> | |||
| <SourceRoot Include="C:\Users\christophe_brachet\.nuget\packages\" /> | |||
| <SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" /> | |||
| </ItemGroup> | |||
| </Project> | |||
| @@ -0,0 +1,2 @@ | |||
| <?xml version="1.0" encoding="utf-8" standalone="no"?> | |||
| <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" /> | |||
| @@ -0,0 +1,88 @@ | |||
| { | |||
| "version": 2, | |||
| "dgSpecHash": "PJjmy8BAJB4=", | |||
| "success": true, | |||
| "projectFilePath": "C:\\Users\\christophe_brachet\\Desktop\\Code\\SecureData\\SecureData\\SecureData.csproj", | |||
| "expectedPackageFiles": [ | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\bouncycastle.cryptography\\2.6.1\\bouncycastle.cryptography.2.6.1.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\microsoft.netcore.platforms\\3.1.0\\microsoft.netcore.platforms.3.1.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\microsoft.netcore.targets\\1.1.0\\microsoft.netcore.targets.1.1.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\microsoft.win32.systemevents\\4.7.0\\microsoft.win32.systemevents.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\runtime.debian.8-x64.runtime.native.system.security.cryptography.openssl\\4.3.2\\runtime.debian.8-x64.runtime.native.system.security.cryptography.openssl.4.3.2.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\runtime.fedora.23-x64.runtime.native.system.security.cryptography.openssl\\4.3.2\\runtime.fedora.23-x64.runtime.native.system.security.cryptography.openssl.4.3.2.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\runtime.fedora.24-x64.runtime.native.system.security.cryptography.openssl\\4.3.2\\runtime.fedora.24-x64.runtime.native.system.security.cryptography.openssl.4.3.2.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\runtime.native.system.security.cryptography.apple\\4.3.1\\runtime.native.system.security.cryptography.apple.4.3.1.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\runtime.native.system.security.cryptography.openssl\\4.3.2\\runtime.native.system.security.cryptography.openssl.4.3.2.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\runtime.opensuse.13.2-x64.runtime.native.system.security.cryptography.openssl\\4.3.2\\runtime.opensuse.13.2-x64.runtime.native.system.security.cryptography.openssl.4.3.2.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\runtime.opensuse.42.1-x64.runtime.native.system.security.cryptography.openssl\\4.3.2\\runtime.opensuse.42.1-x64.runtime.native.system.security.cryptography.openssl.4.3.2.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\runtime.osx.10.10-x64.runtime.native.system.security.cryptography.apple\\4.3.1\\runtime.osx.10.10-x64.runtime.native.system.security.cryptography.apple.4.3.1.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\runtime.osx.10.10-x64.runtime.native.system.security.cryptography.openssl\\4.3.2\\runtime.osx.10.10-x64.runtime.native.system.security.cryptography.openssl.4.3.2.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\runtime.rhel.7-x64.runtime.native.system.security.cryptography.openssl\\4.3.2\\runtime.rhel.7-x64.runtime.native.system.security.cryptography.openssl.4.3.2.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\runtime.ubuntu.14.04-x64.runtime.native.system.security.cryptography.openssl\\4.3.2\\runtime.ubuntu.14.04-x64.runtime.native.system.security.cryptography.openssl.4.3.2.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\runtime.ubuntu.16.04-x64.runtime.native.system.security.cryptography.openssl\\4.3.2\\runtime.ubuntu.16.04-x64.runtime.native.system.security.cryptography.openssl.4.3.2.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\runtime.ubuntu.16.10-x64.runtime.native.system.security.cryptography.openssl\\4.3.2\\runtime.ubuntu.16.10-x64.runtime.native.system.security.cryptography.openssl.4.3.2.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\safeorbit\\0.3.1\\safeorbit.0.3.1.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.collections\\4.3.0\\system.collections.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.collections.concurrent\\4.3.0\\system.collections.concurrent.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.componentmodel\\4.3.0\\system.componentmodel.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.diagnostics.debug\\4.3.0\\system.diagnostics.debug.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.diagnostics.tracing\\4.3.0\\system.diagnostics.tracing.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.drawing.common\\4.7.0\\system.drawing.common.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.globalization\\4.3.0\\system.globalization.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.io\\4.3.0\\system.io.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.io.filesystem\\4.3.0\\system.io.filesystem.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.io.filesystem.primitives\\4.3.0\\system.io.filesystem.primitives.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.linq\\4.3.0\\system.linq.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.reflection\\4.3.0\\system.reflection.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.reflection.metadata\\1.8.0\\system.reflection.metadata.1.8.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.reflection.primitives\\4.3.0\\system.reflection.primitives.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.reflection.typeextensions\\4.7.0\\system.reflection.typeextensions.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.resources.resourcemanager\\4.3.0\\system.resources.resourcemanager.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.runtime\\4.3.0\\system.runtime.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.runtime.extensions\\4.3.0\\system.runtime.extensions.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.runtime.handles\\4.3.0\\system.runtime.handles.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.runtime.interopservices\\4.3.0\\system.runtime.interopservices.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.runtime.numerics\\4.3.0\\system.runtime.numerics.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.runtime.serialization.primitives\\4.3.0\\system.runtime.serialization.primitives.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.security.accesscontrol\\4.7.0\\system.security.accesscontrol.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.security.cryptography.algorithms\\4.3.1\\system.security.cryptography.algorithms.4.3.1.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.security.cryptography.encoding\\4.3.0\\system.security.cryptography.encoding.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.security.cryptography.primitives\\4.3.0\\system.security.cryptography.primitives.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.security.cryptography.protecteddata\\4.7.0\\system.security.cryptography.protecteddata.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.security.permissions\\4.7.0\\system.security.permissions.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.security.principal.windows\\4.7.0\\system.security.principal.windows.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.text.encoding\\4.3.0\\system.text.encoding.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.text.encoding.extensions\\4.3.0\\system.text.encoding.extensions.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.text.regularexpressions\\4.3.0\\system.text.regularexpressions.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.threading\\4.3.0\\system.threading.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.threading.tasks\\4.3.0\\system.threading.tasks.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.threading.tasks.extensions\\4.3.0\\system.threading.tasks.extensions.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.threading.tasks.parallel\\4.3.0\\system.threading.tasks.parallel.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.threading.thread\\4.3.0\\system.threading.thread.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.threading.threadpool\\4.3.0\\system.threading.threadpool.4.3.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.windows.extensions\\4.7.0\\system.windows.extensions.4.7.0.nupkg.sha512", | |||
| "C:\\Users\\christophe_brachet\\.nuget\\packages\\system.xml.readerwriter\\4.3.1\\system.xml.readerwriter.4.3.1.nupkg.sha512" | |||
| ], | |||
| "logs": [ | |||
| { | |||
| "code": "NU1904", | |||
| "level": "Warning", | |||
| "warningLevel": 1, | |||
| "message": "Le package 'System.Drawing.Common' 4.7.0 présente une vulnérabilité de gravité critique connue, https://github.com/advisories/GHSA-rxg9-xrhp-64gj.", | |||
| "libraryId": "System.Drawing.Common", | |||
| "targetGraphs": [ | |||
| "net8.0" | |||
| ] | |||
| }, | |||
| { | |||
| "code": "NU1903", | |||
| "level": "Warning", | |||
| "warningLevel": 1, | |||
| "message": "Le package 'System.Text.RegularExpressions' 4.3.0 présente une vulnérabilité de gravité élevé(e) connue, https://github.com/advisories/GHSA-cmhx-cq75-c4mj.", | |||
| "libraryId": "System.Text.RegularExpressions", | |||
| "targetGraphs": [ | |||
| "net8.0" | |||
| ] | |||
| } | |||
| ] | |||
| } | |||