[sugar] unique id

Alex Polvi alex at polvi.net
Sun Apr 1 12:06:21 EDT 2007


On 3/29/07, Dan Williams <dcbw at redhat.com> wrote:
> On Wed, 2007-03-28 at 21:22 -0400, Erik Blankinship wrote:
> > Hello
> >
> > We would like to resolve the ambiguity when two kids on the network
> > have the same nickname and colors.  Is there an XO id and how do we
> > access that?  Or should we be thinking about this differently?
>
> from sugar import profile
>
> key = profile.get_pubkey()
>
> If you want a shorter key, you can hash that like:
>
> from sugar import util
>
> key_hash = util._sha_data(key)
> hashed_key = util.printable_hash(key_hash)

This is also convient since we could handle where the laptops backup
goes server side, just by using the pub key and some authorized_keys
magic.

-Alex


More information about the Sugar mailing list