Coder Social home page Coder Social logo

scrt-hq / pemencrypt Goto Github PK

View Code? Open in Web Editor NEW
24.0 24.0 2.0 1.61 MB

PEMEncrypt is a cross-platform PowerShell module handling string encryption and decryption using RSA keys only.

License: Apache License 2.0

C# 11.84% PowerShell 88.16%
certificate decryption encrypt-strings pem powershell rsa-keys

pemencrypt's People

Contributors

scrthq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pemencrypt's Issues

Create Destination Folder

Throwing out consideration for the creation of the destination folder when a path is given with New-RSAKeyPair. Especially when choosing the default path where on Windows creating a folder that begins with a dot is not user friendly in the GUI.

Exception calling the Encrypt function

When executing your command:
$encrypted = "Hello","How are you" | Protect-PEMString -PublicKey .\mykey.pub
PowerShell throws the Exception Error

Protect-PEMString : Exception calling "Encrypt" with "2" argument(s): "Object reference not set to an instance of an
object."
At line:1 char:38
+ ... Hello","How are you" | Protect-PEMString -PublicKey .\mykey.pub
+                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Protect-PEMString], MethodInvocationException
    + FullyQualifiedErrorId : NullReferenceException,Protect-PEMString

I am using PowerShell Version 5.1.17763.1490 and version 0.2.1 of the PEMEncrypt module.

Longer strings are not supported

Hi! I just wanted to drop a friendly note that your library won't be able to encrypt strings longer than the key modulus size in bytes minus padding size (11 bytes for PKCS #1). For example, if your RSA key is 2048 bit long (therefore its modulus is 2048 bits/256 bytes), you will only be able to encrypt plaintexts that are 245 bytes in length or less. RSACryptoServiceProvider will throw CryptographicException when the plaintext is too long. You might want to point this out in the documentation.

Useful links:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.