• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Encrypt/Decrypt a Text File
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Encrypt/Decrypt a Text File


  • Subject: Re: Encrypt/Decrypt a Text File
  • From: RenĂ© v Amerongen <email@hidden>
  • Date: Thu, 14 Aug 2014 00:28:45 +0200

Hi,

Actually, I see your script can't handle spaces in filenames.


also did you check the openssl call by it self?
like f.e
sudo openssl aes-256-cbc -a -salt -in /Applications/_Games/adlist.html -out /Applications/_Games/adlist.html.cr
you wil get ask for more then one password.

hth


Op 13 aug. 2014, om 18:01 heeft Iurista GmbH <email@hidden> het volgende geschreven:

>
> Am 29.07.2014 um 19.19 schrieb Eric Geoffroy:
>
>> OpenSSL is on every Mac and lots of Unix distros. Nothing to install. Super easy. Super secure.
>>
>> This is the basic command to encrypt a file:
>>
>> openssl aes-256-cbc -a -salt -in secrets.txt -out secrets.txt.enc
>>
>> Decrypt-
>>
>> openssl aes-256-cbc -d -a -in secrets.txt.enc -out secrets.txt.new
>
> I have tried to put that into an applescript like this
>
> tell application "Finder"
> 	set sel to selection
> 	set theItem to item 1 of sel
> 	set Datei to theItem as alias as text
> 	set Dateiname to name of theItem
> 	set DateiPfad to container of theItem as alias as text
> end tell
>
> set oldDelim to AppleScript's text item delimiters
> set AppleScript's text item delimiters to ":"
>
> set Pfad0 to text items 2 thru end of DateiPfad
> set AppleScript's text item delimiters to "/"
> set Pfad to (Pfad0 as text)
>
> set AppleScript's text item delimiters to oldDelim
>
>
> set INPUT to ("/" & Pfad & Dateiname)
> set OUTPUT to (INPUT & ".enc")
> log INPUT
> log OUTPUT
>
> do shell script ("openssl aes-256-cbc -a -salt -in " & INPUT & " -out " & OUTPUT) with administrator privileges
>
> When running, it asks for my login password, but after having entered successfully the password, the script throws an error 1 ("error "bad password read" number 1) instead of asking for the ecription password.
> What do I have to add?
>
> Thanks for advice
> Rudolf
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden


References: 
 >Re: Encrypt/Decrypt a Text File (From: Iurista GmbH <email@hidden>)

  • Prev by Date: Re: Encrypt/Decrypt a Text File
  • Next by Date: File-Info as Text
  • Previous by thread: Re: Encrypt/Decrypt a Text File
  • Next by thread: File-Info as Text
  • Index(es):
    • Date
    • Thread