PICE 2.0.0

Encrypt strings using image pixels!

Install-Package PICE -Version 2.0.0
dotnet add package PICE --version 2.0.0
<PackageReference Include="PICE" Version="2.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PICE --version 2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

PICE


NOTICE: This Project is only intended for U.S.A (United States of America) Residents, if you are not of the USA you are prohibited to use this project. Otherwise, this project is licensed under a Modified Apache Licensed 2.0. Remember, each country has its laws/constraints on encryption, the author of PICE is not responsible for any violations.

This project is just an experiment and you are recommended to not use it in any big projects.

Encrypt strings using pictures

v 2.0.0

PICE (meaning: PICture Encryption)

Languages supported so far:

  • C#

Currently working on:

  • randomly generated image files
  • read and write files without having to use File.WriteAllBytes and File.ReadAllBytes (new syntax is going to be PICEENCRYPT.EncryptFile(img, string, file) and PICEENCRYPT.DecryptFile(img, file))

UPDATE:

  • You can now use picture files that are smaller than the actual string! (less secure)
  • You can now set the encryption layers!
  • There is now simple mixing of the letters before the encryption!

How it works

PICE Encodes a string with utf32 then uses the rgba values of each pixel in a image file to encrypt the encoded string.

DOCS

C#

Download from Github NuGet -> dotnet add PROJECT package PICE

Download with NuGet PM -> Install-Package PICE

(NuGet Will be updated before github page)

USE 1.0.0-STABLE or 2.0.0 and later, DO NOT USE ANY OTHER VERSION, THEY WILL NOT WORK

Encrypt and decrypt a string example ->

using System;
using PICE;
class PICETEST {
   static void Main(string[] args) {
      //make sure the area of the picture is bigger than the length of the string, It will cause errors if not!
      //encrypts data using image
      byte[] myEncryption = PICEENCRYPT.Encrypt("./myimg.png" /*get image path*/, "Hello, World", 15/*encryption layers, default is 15*/)
      
      //use same image file to decrypt
      string deCrypt = PICEENCRYPT.Decrypt("./myimg.png", myEncryption, 15/*encryption layers, default is 15*/);
    }
}

Encrypt a string to file ->

using System;
using System.IO;
using PICE;
class PICETEST {
   static void Main(string[] args) {
      //make sure the area of the picture is bigger than the length of the string, It will cause errors if not!
      //encrypts data using image
      byte[] myEncryption = PICEENCRYPT.Encrypt("./myimg.png" /*get image path*/, "Hello, World", 15/*encryption layers, default is 15*/)
      File.WriteAllBytes("./encryptedfile.pice" /* your encrypted files path */, myEncryption);
      //use same image file to decrypt
      string deCrypt = PICEENCRYPT.Decrypt("./myimg.png", File.ReadAllBytes("./encrypdedfile.pice") /* reads the encrypted file and decrypts it*/,15/*encryption layers, default is 15*/);
    }
}

more

Join my discord programming server! - https://discord.gg/NVm6Rd5

For more Nuget Downloads - https://www.nuget.org/packages/PICE/

PICE


NOTICE: This Project is only intended for U.S.A (United States of America) Residents, if you are not of the USA you are prohibited to use this project. Otherwise, this project is licensed under a Modified Apache Licensed 2.0. Remember, each country has its laws/constraints on encryption, the author of PICE is not responsible for any violations.

This project is just an experiment and you are recommended to not use it in any big projects.

Encrypt strings using pictures

v 2.0.0

PICE (meaning: PICture Encryption)

Languages supported so far:

  • C#

Currently working on:

  • randomly generated image files
  • read and write files without having to use File.WriteAllBytes and File.ReadAllBytes (new syntax is going to be PICEENCRYPT.EncryptFile(img, string, file) and PICEENCRYPT.DecryptFile(img, file))

UPDATE:

  • You can now use picture files that are smaller than the actual string! (less secure)
  • You can now set the encryption layers!
  • There is now simple mixing of the letters before the encryption!

How it works

PICE Encodes a string with utf32 then uses the rgba values of each pixel in a image file to encrypt the encoded string.

DOCS

C#

Download from Github NuGet -> dotnet add PROJECT package PICE

Download with NuGet PM -> Install-Package PICE

(NuGet Will be updated before github page)

USE 1.0.0-STABLE or 2.0.0 and later, DO NOT USE ANY OTHER VERSION, THEY WILL NOT WORK

Encrypt and decrypt a string example ->

using System;
using PICE;
class PICETEST {
   static void Main(string[] args) {
      //make sure the area of the picture is bigger than the length of the string, It will cause errors if not!
      //encrypts data using image
      byte[] myEncryption = PICEENCRYPT.Encrypt("./myimg.png" /*get image path*/, "Hello, World", 15/*encryption layers, default is 15*/)
      
      //use same image file to decrypt
      string deCrypt = PICEENCRYPT.Decrypt("./myimg.png", myEncryption, 15/*encryption layers, default is 15*/);
    }
}

Encrypt a string to file ->

using System;
using System.IO;
using PICE;
class PICETEST {
   static void Main(string[] args) {
      //make sure the area of the picture is bigger than the length of the string, It will cause errors if not!
      //encrypts data using image
      byte[] myEncryption = PICEENCRYPT.Encrypt("./myimg.png" /*get image path*/, "Hello, World", 15/*encryption layers, default is 15*/)
      File.WriteAllBytes("./encryptedfile.pice" /* your encrypted files path */, myEncryption);
      //use same image file to decrypt
      string deCrypt = PICEENCRYPT.Decrypt("./myimg.png", File.ReadAllBytes("./encrypdedfile.pice") /* reads the encrypted file and decrypts it*/,15/*encryption layers, default is 15*/);
    }
}

more

Join my discord programming server! - https://discord.gg/NVm6Rd5

For more Nuget Downloads - https://www.nuget.org/packages/PICE/

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
2.0.0 130 10/5/2020