Skip to content

Exception calling the Encrypt function #6

@mosesmosheh

Description

@mosesmosheh

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions