Hi folks,
I need to encrypt a stream. I want to write a file like: StandardFileStream fileNamed: 'encryptedfile' do: [:str | str nextPutAll: 'string to be encrypted']. of course the file is in plain text :-) It would be wonderful if I can write something like: EncrypedFileStream fileNamed: 'encryptedfile' do: [:str | str nextPutAll: 'string to be encrypted'] using: 'AES' andPassword: '12345' Can you help me, please? Cheers Frank |
Hi,
Have you seen the Cryptography package, you can get it by downloading Nacl from Configuration Browser. It implements RC4 which is a Stream Cipher, but seems that a little bit of work is needed in order to use it on a Stream since it receives a ByteArray. Cheers, Alejandro On Jun 7, 2014, at 2:54 PM, Frank <[hidden email]> wrote: > Hi folks, > > I need to encrypt a stream. > > I want to write a file like: > StandardFileStream fileNamed: 'encryptedfile' do: [:str | str nextPutAll: > 'string to be encrypted']. > > of course the file is in plain text :-) > > It would be wonderful if I can write something like: > EncrypedFileStream fileNamed: 'encryptedfile' do: [:str | str nextPutAll: > 'string to be encrypted'] using: 'AES' andPassword: '12345' > > Can you help me, please? > > Cheers > Frank > > > > -- > View this message in context: http://forum.world.st/How-to-encrypt-a-stream-tp4762022.html > Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com. > |
My bad, the configuration is called ApplicationSecurity, which includes Nacl and Cryptography.
Cheers On Jun 8, 2014, at 8:39 PM, Alejandro Infante <[hidden email]> wrote: > Hi, > > Have you seen the Cryptography package, you can get it by downloading Nacl from Configuration Browser. It implements RC4 which is a Stream Cipher, but seems that a little bit of work is needed in order to use it on a Stream since it receives a ByteArray. > > Cheers, > Alejandro > > On Jun 7, 2014, at 2:54 PM, Frank <[hidden email]> wrote: > >> Hi folks, >> >> I need to encrypt a stream. >> >> I want to write a file like: >> StandardFileStream fileNamed: 'encryptedfile' do: [:str | str nextPutAll: >> 'string to be encrypted']. >> >> of course the file is in plain text :-) >> >> It would be wonderful if I can write something like: >> EncrypedFileStream fileNamed: 'encryptedfile' do: [:str | str nextPutAll: >> 'string to be encrypted'] using: 'AES' andPassword: '12345' >> >> Can you help me, please? >> >> Cheers >> Frank >> >> >> >> -- >> View this message in context: http://forum.world.st/How-to-encrypt-a-stream-tp4762022.html >> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com. >> > |
Thanks Alejandro, I gonna try it
Cheers Frank
|
Free forum by Nabble | Edit this page |