anchor.diff:  
   
   init([]) ->
  -    put(left, uuid:get_vr()),
       SupFlags = #{strategy => one_for_one,
                    intensity => 60,
                    period => 300},
  
positive.code:             refresh_credentials()
      end.
  
  
  refresh_credentials() ->
      {ok, IamEp} = application:get_env(nook, metadata),
      case httpc:request(IamEp ++ "NookRole") of
  
negative.code:            token = encrypt(T)}.
  
  encrypt(PlainText) ->
      X = get_key(),
      State = crypto:stream_init(aes_ctr, X, X),
      {_, CipherText} = crypto:stream_encrypt(State, PlainText),
      CipherText.
  
  
  decrypt(CipherText) ->
      X = get_key(),
      State = crypto:stream_init(aes_ctr, X, X),
      {_, PlainText} = crypto:stream_decrypt(State, CipherText),
      PlainText.
  
  get_key() ->
      case application:get_env(nook, left) of
          undefined ->
              Key = uuid:get_v4(),
              application:put_env(nook, left, Key),
              Key;
          Value ->
              Value
  end.
  