How to encrypt a stream?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to encrypt a stream?

Frank
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
Reply | Threaded
Open this post in threaded view
|

Re: How to encrypt a stream?

Alejandro Infante
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.
>


Reply | Threaded
Open this post in threaded view
|

Re: How to encrypt a stream?

Alejandro Infante
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.
>>
>


Reply | Threaded
Open this post in threaded view
|

Re: How to encrypt a stream?

Frank
Thanks Alejandro, I gonna try it
Cheers
 Frank

Alejandro Infante wrote
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.
>>
>