Hello people, I'm making a Practical Work in Pharo with my classmates, the Work should be a fully working application to manage a University Library. At the moment we have most of the work done, I must say it's messy and far from being beautiful, but it works and it's likely to be approved. Here is what's done so far: https://github.com/arguser/Paradigmas-Final
Most of the work was doing making research and guided mostly y examples, so far I didn't find how to do or make work some features: * A Dialog which prompts for User and Password (We don't know how to implement it in-code either) * Block a father window when a child is made, so the father window can't be closed if a child window exist. * Make some content of windows change size dynamically. * Search only for filled-in fields from search form. If any advice or example can be given addressing the previous matters it will be really helpful. Thanks in advance! |
CONTENTS DELETED
The author has deleted this message.
|
In reply to this post by J. P. L. Martín
CONTENTS DELETED
The author has deleted this message.
|
In reply to this post by hilaire
Most of the GUI is based on UITheme examples, yet I wasn't able to figure out about user/password prompt. And I'm missing how should I implement it on code (not GUI) OrderedCollection of Class Users with instanse variable "password" asString? On Fri, Feb 1, 2013 at 9:20 PM, Hilaire Fernandes <[hidden email]> wrote: Related to widget (for password and search only for filled-in fields), |
In reply to this post by J. P. L. Martín
For an example of the login process using Pharo + Seaside see
http://www.squeaksource.com/TFLogin Which you can probably adapt for just Pharo To store the passwords, if you're on linux, use the bcrypt implementation in the PasswordHashingFFI package from here: http://www.squeaksource.com/Cryptography.html I'd be interested in getting PasswordHashingFFI working on Windows or MacOSX so would help if I can. But using it makes your implementation depend upon an external library you'd likely have to find and supply for users. On 02/01/2013 03:36 PM, J. P. L. Martín wrote: > Hello people, I'm making a Practical Work in Pharo with my classmates, > the Work should be a fully working application to manage a University > Library. At the moment we have most of the work done, I must say it's > messy and far from being beautiful, but it works and it's likely to be > approved. Here is what's done so far: > https://github.com/arguser/Paradigmas-Final > > Most of the work was doing making research and guided mostly y examples, > so far I didn't find how to do or make work some features: > * A Dialog which prompts for User and Password (We don't know how to > implement it in-code either) > * Block a father window when a child is made, so the father window can't > be closed if a child window exist. > * Make some content of windows change size dynamically. > * Search only for filled-in fields from search form. > > If any advice or example can be given addressing the previous matters it > will be really helpful. > > Thanks in advance! > > |
Why not just something like
| password cryptedPassword | password := UITheme current passwordEntryIn: World text: 'Password' title: 'Title' entryText: ''. cryptedPassword := MD5 new initialize hashStream: password readStream ? Ben On Feb 2, 2013, at 5:06 PM, Paul DeBruicker <[hidden email]> wrote: For an example of the login process using Pharo + Seaside see |
In reply to this post by J. P. L. Martín
Ben On Feb 2, 2013, at 2:56 AM, J. P. L. Martín <[hidden email]> wrote:
You can also have a look at PasswordInitializationDialogWindow: PasswordInitializationDialogWindow new openInWorld For encryption, you can also use SecureHashAlgorithm new hashMessage: aString
childerWindow openModal: fatherWindow
You can do that using Morphic, but this is quite tricky (in fact, you need to remove all the sub widgets, then change their layout and re add them) Spec provides a simpler way to do it. If you are interested in, I can point you some documentation :)
Sorry, I do not get this one :) Ben
|
In reply to this post by Benjamin Van Ryseghem (Pharo)
I guess it depends on the cost to you or your organization of having
someone you don't want/know getting access to information that should be password protected. A thorough argument for bcrypt rather than md5/SHA is made here: http://codahale.com/how-to-safely-store-a-password/ I use it because for roughly the same number of lines of code passwords are much harder to crack. On 02/02/2013 09:02 AM, Benjamin wrote: > Why not just something like > > | password cryptedPassword | > > password := UITheme current passwordEntryIn: World text: 'Password' > title: 'Title' entryText: ''. > cryptedPassword := MD5 new initialize hashStream: password readStream > > ? > > > Ben > > On Feb 2, 2013, at 5:06 PM, Paul DeBruicker <[hidden email] > <mailto:[hidden email]>> wrote: > >> For an example of the login process using Pharo + Seaside see >> >> http://www.squeaksource.com/TFLogin >> >> Which you can probably adapt for just Pharo >> >> >> To store the passwords, if you're on linux, use the bcrypt >> implementation in the PasswordHashingFFI package from here: >> >> http://www.squeaksource.com/Cryptography.html >> >> I'd be interested in getting PasswordHashingFFI working on Windows or >> MacOSX so would help if I can. But using it makes your implementation >> depend upon an external library you'd likely have to find and supply for >> users. >> >> >> >> >> >> >> >> On 02/01/2013 03:36 PM, J. P. L. Martín wrote: >>> Hello people, I'm making a Practical Work in Pharo with my classmates, >>> the Work should be a fully working application to manage a University >>> Library. At the moment we have most of the work done, I must say it's >>> messy and far from being beautiful, but it works and it's likely to be >>> approved. Here is what's done so far: >>> https://github.com/arguser/Paradigmas-Final >>> >>> Most of the work was doing making research and guided mostly y examples, >>> so far I didn't find how to do or make work some features: >>> * A Dialog which prompts for User and Password (We don't know how to >>> implement it in-code either) >>> * Block a father window when a child is made, so the father window can't >>> be closed if a child window exist. >>> * Make some content of windows change size dynamically. >>> * Search only for filled-in fields from search form. >>> >>> If any advice or example can be given addressing the previous matters it >>> will be really helpful. >>> >>> Thanks in advance! >>> >>> >> >> > |
Ok :)
I will read this (since I am not an expert in security and encryption, it's cool to have something to read to be less stupid about this ^^)
Ben On Feb 2, 2013, at 6:33 PM, Paul DeBruicker <[hidden email]> wrote: I guess it depends on the cost to you or your organization of having |
In reply to this post by Benjamin Van Ryseghem (Pharo)
I'm not sure how should I, for making the GUI we mainly based on the ContactList example on PharoCasts: http://www.pharocasts.com/2011/02/pharo-gui-with-polymorph.html Which is called this way:This is my child window: UIPrestamos>>openModal openModal | builder content dialog | prestamo id: (Prestamo database size = 0 ifTrue: 1 ifFalse: [Prestamo database last id + 1]) asString. builder := UITheme builder. content := builder newLabelGroup: {('Prestamo: ' -> (builder newLabelFor: self prestamo getLabel: #id getEnabled: nil )). ('Socio ' -> (builder newTextEntryFor: self prestamo getText: #idSocio setText: #idSocio: help: 'Codigo de Socio')). ('Ejemplar: ' -> (builder newTextEntryFor: self prestamo getText: #idEjemplar setText: #idEjemplar: help: 'Codigo de Ejemplar'))}. dialog := builder newPluggableDialogWindow: 'Nuevo Prestamo' for: content. builder openModal: dialog. dialog cancelled ifFalse: [self doOnOK]. ---- UIBabel>>addPrestamo addPrestamo | prestamo alerta | prestamo := Prestamo new. alerta := AlertDialogWindow new. UIPrestamos new prestamo: prestamo; onOK: [ ((Ejemplar database anySatisfy: [:x | x idEjemplar = prestamo idEjemplar and: (x fechaBaja = '') ]) and: (Socio database anySatisfy: [:y| y numeroDeSocio = prestamo idSocio])) ifTrue: [Prestamo database add: prestamo] ifFalse: [alerta alert: 'El socio o el ejemplar no se encuentra disponible']. seleccionado := Prestamo database size. self changed: #listado; changed: #selecciono ]; openModal. ----
childerWindow openModal: fatherWindow |
In reply to this post by Paul DeBruicker
thanks paul
this is another nice article. I always learn something with these. Stef On Feb 2, 2013, at 6:33 PM, Paul DeBruicker wrote: > I guess it depends on the cost to you or your organization of having > someone you don't want/know getting access to information that should be > password protected. > > A thorough argument for bcrypt rather than md5/SHA is made here: > > http://codahale.com/how-to-safely-store-a-password/ > > > I use it because for roughly the same number of lines of code passwords > are much harder to crack. > > > > On 02/02/2013 09:02 AM, Benjamin wrote: >> Why not just something like >> >> | password cryptedPassword | >> >> password := UITheme current passwordEntryIn: World text: 'Password' >> title: 'Title' entryText: ''. >> cryptedPassword := MD5 new initialize hashStream: password readStream >> >> ? >> >> >> Ben >> >> On Feb 2, 2013, at 5:06 PM, Paul DeBruicker <[hidden email] >> <mailto:[hidden email]>> wrote: >> >>> For an example of the login process using Pharo + Seaside see >>> >>> http://www.squeaksource.com/TFLogin >>> >>> Which you can probably adapt for just Pharo >>> >>> >>> To store the passwords, if you're on linux, use the bcrypt >>> implementation in the PasswordHashingFFI package from here: >>> >>> http://www.squeaksource.com/Cryptography.html >>> >>> I'd be interested in getting PasswordHashingFFI working on Windows or >>> MacOSX so would help if I can. But using it makes your implementation >>> depend upon an external library you'd likely have to find and supply for >>> users. >>> >>> >>> >>> >>> >>> >>> >>> On 02/01/2013 03:36 PM, J. P. L. Martín wrote: >>>> Hello people, I'm making a Practical Work in Pharo with my classmates, >>>> the Work should be a fully working application to manage a University >>>> Library. At the moment we have most of the work done, I must say it's >>>> messy and far from being beautiful, but it works and it's likely to be >>>> approved. Here is what's done so far: >>>> https://github.com/arguser/Paradigmas-Final >>>> >>>> Most of the work was doing making research and guided mostly y examples, >>>> so far I didn't find how to do or make work some features: >>>> * A Dialog which prompts for User and Password (We don't know how to >>>> implement it in-code either) >>>> * Block a father window when a child is made, so the father window can't >>>> be closed if a child window exist. >>>> * Make some content of windows change size dynamically. >>>> * Search only for filled-in fields from search form. >>>> >>>> If any advice or example can be given addressing the previous matters it >>>> will be really helpful. >>>> >>>> Thanks in advance! >>>> >>>> >>> >>> >> > > |
In reply to this post by J. P. L. Martín
Sorry, but it's too late now for me to read spanish :s
Can you provide an "english" version of this please ? Ben On Feb 2, 2013, at 7:54 PM, J. P. L. Martín <[hidden email]> wrote:
|
Prestamo = Loan Ejemplar = a Copy (of a Material)On Sat, Feb 2, 2013 at 4:09 PM, Benjamin <[hidden email]> wrote:
|
In reply to this post by Stéphane Ducasse
> On 02/02/2013 09:02 AM, Benjamin wrote: >> Why not just something like >> >> | password cryptedPassword | >> >> password := UITheme current passwordEntryIn: World text: 'Password' >> title: 'Title' entryText: ''. >> cryptedPassword := MD5 new initialize hashStream: password readStream >> >> ? >> >> >> Ben Any way to put only the password field into modal with UITheme buider? Let's say: UILogin>>login login |builder content dialog| builder := UITheme builder. content := { 'User: ' -> (builder newTextEntryFor: self getText: #username setText: #username: help: 'Username'). Password -> (builder newPasswordEntry (for example) setText: #password help: 'Password').} dialog := builder newPluggableDialogWindowIn: 'Acceso' for: content. builder openModal: dialog. |
In reply to this post by J. P. L. Martín
Solution was pretty easy, I've replaced with:builder openModal: dialog
On Sat, Feb 2, 2013 at 4:26 PM, J. P. L. Martín <[hidden email]> wrote:
|
Administrator
|
Note that in 2.0, it's even easier: "dialog openModal"
Cheers,
Sean |
In reply to this post by Paul DeBruicker
In fact, the one-way hash functions (MD5, SHA-1, SHA-256/512, ...) are
not for password encryption, they are for computing a digest of messages in order to ensure their integrity. These functions usually suffer of recognizability and of computing speed and hence they cannot be used to encrypt passwords. To encrypt passwords, some features are added to these well-known hash functions in order to generate more entropy in the computing of the digest: salting and stretching. For example, the algorithms used in the Unix systems are variations of MD5 and of SHA-256/512 using these two techniques. In another way, in effect, there is a family of cryptographic algorithms that is more suited to encrypt the passwords: the adaptive key derivation functions in which we can find bcrypt but also PBKDF2 and scrypt. (OpenBSD, an operating system obsessed with security, uses bcrypt as its default authentication mechanism). Beside the cryptographic functions for passwords, there is also some recommendations to follow. Among them: - prefer passphrases to passwords: the user can more easily remember them and they add inherently more of entropy, - for each authentication failure, multiply by 2 or more the time between two retries. Miguel Le 02/02/2013 18:33, Paul DeBruicker a écrit : > I guess it depends on the cost to you or your organization of having > someone you don't want/know getting access to information that should be > password protected. > > A thorough argument for bcrypt rather than md5/SHA is made here: > > http://codahale.com/how-to-safely-store-a-password/ > > > I use it because for roughly the same number of lines of code passwords > are much harder to crack. > > > > On 02/02/2013 09:02 AM, Benjamin wrote: >> Why not just something like >> >> | password cryptedPassword | >> >> password := UITheme current passwordEntryIn: World text: 'Password' >> title: 'Title' entryText: ''. >> cryptedPassword := MD5 new initialize hashStream: password readStream >> >> ? >> >> >> Ben >> >> On Feb 2, 2013, at 5:06 PM, Paul DeBruicker <[hidden email] >> <mailto:[hidden email]>> wrote: >> >>> For an example of the login process using Pharo + Seaside see >>> >>> http://www.squeaksource.com/TFLogin >>> >>> Which you can probably adapt for just Pharo >>> >>> >>> To store the passwords, if you're on linux, use the bcrypt >>> implementation in the PasswordHashingFFI package from here: >>> >>> http://www.squeaksource.com/Cryptography.html >>> >>> I'd be interested in getting PasswordHashingFFI working on Windows or >>> MacOSX so would help if I can. But using it makes your implementation >>> depend upon an external library you'd likely have to find and supply for >>> users. >>> >>> >>> >>> >>> >>> >>> >>> On 02/01/2013 03:36 PM, J. P. L. Martín wrote: >>>> Hello people, I'm making a Practical Work in Pharo with my classmates, >>>> the Work should be a fully working application to manage a University >>>> Library. At the moment we have most of the work done, I must say it's >>>> messy and far from being beautiful, but it works and it's likely to be >>>> approved. Here is what's done so far: >>>> https://github.com/arguser/Paradigmas-Final >>>> >>>> Most of the work was doing making research and guided mostly y examples, >>>> so far I didn't find how to do or make work some features: >>>> * A Dialog which prompts for User and Password (We don't know how to >>>> implement it in-code either) >>>> * Block a father window when a child is made, so the father window can't >>>> be closed if a child window exist. >>>> * Make some content of windows change size dynamically. >>>> * Search only for filled-in fields from search form. >>>> >>>> If any advice or example can be given addressing the previous matters it >>>> will be really helpful. >>>> >>>> Thanks in advance! >>>> >>>> >>> > -- |
Free forum by Nabble | Edit this page |