-
Notifications
You must be signed in to change notification settings - Fork 12
Support for signing PowerShell scripts #13
Copy link
Copy link
Open
Description
It would be awesome if this project added support for signing PowerShell scripts given the private key and a string that contains the PS. As far as I know, no other cross-platform project supports this right now.
It looks like, to do this, we need to encode the signature (which I don't understand how the sig is generated) in the following way:
def format_binary_sig(contents):
chunks = lambda x, size = 64 : [x[i:i+size] for i in range(0, len(x), size)]
contents = base64.b64encode(contents)
contents = '\n# '.join(chunks(contents.decode('utf-8'), size = 64))
contents = '\n# SIG # Begin signature block\n# %s\n# SIG # End signature block\n' % contents
return contents.replace('\n', '\r\n')Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels