.net - RSA Digital Signature in PowerShell -


my requirement digitally sign message/string, , once have accomplished that, somehow need attach header of web request, has done using powershell.

i think figured out how it, still struggling on actual implementation.

so far powershell script:

  # loading certificate want use         $thumbprint = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'         $cert = get-item path cert:\localmachine\my\$thumbprint -erroraction stop           #cast privatkey object rsacryptoserviceprovider object         rsacryptoservicepovider $privatekey                             =  $cert.privatekey rsacryptoserviceprovider           byte[] buffer = encoding.default.getbytes("hello world ... !");         byte[] signature= $privatekey.signdata(***buffer, new sha1managed()***); 

i getting error on above line right put *.

i following steps shown in link digital signature: https://www.simple-tak.com/dotnet/.net-framework/beginning-with-digital-signatures-in-.net-framework/

and 1 loading certificate: http://powershell.orgwp/2014/02/01/revisited-powershell-and-encryption/comment-page-1/

any appreciated.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -