JurajKubelka / DiscordSt

An API wrapper for Discord written in Pharo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Password and token should not be stored in the image as developers share it regularly.

JurajKubelka opened this issue · comments

password := 'my-password'.
bytes := password utf8Encoded.
bytesSize := bytes size.
externalVolatileSecret := ExternalAddress gcallocate: bytesSize.
bytes withIndexDo: [ :byte :index | 
	externalVolatileSecret byteAt: index put: byte ].


bytes := nil.
password := nil.

externalVolatileSecret isNull.

ByteArray streamContents: [ :aStream |
	1 to: bytesSize do: [ :index | 
		aStream nextPut: (externalVolatileSecret byteAt: index) ] ].

Current solution of reading from settings is tooooo slow.

improved significantly in the external-store