Encrypting using Ambience/Repertoire 202x

If you try the above example using “mypassword” you will get a different result.

The same input will produce different output each time. This means that if someone else happens to use the same secret key as you, they won’t know, because they will see a different encrypted value every time:

./ambience-cli encrypt “sample string”
sample string = {enc:elx-2.0}97Fl8uEfflvpVebF5yuGIx1pAIcb8Fo0/bZvLRVeWE8=
./ambience-cli encrypt “sample string”
sample string = {enc:elx-2.0}WR6uuoVZ1sC4LEGat9Z2RlK22kc5EqNAiSz/Ea2c860=

Both results will be decoded by any instance of Ambience back to the same secret key.

This example also shows that to include spaces in your secret key, you should wrap the entire key with quotes (which are not considered part of the key).

1 Like