Sha256: fd2ecbcebc553689a5e263e08bee411e39a46c89af15bf4227a65e07c9fae152

Contents?: true

Size: 1.73 KB

Versions: 2

Compression:

Stored size: 1.73 KB

Contents

Feature: Unlocked

```javascript
  "lock_with": "UNLOCKED",
  "unlock_with": "UNLOCKED"
```

This keyword should be used to make vault contents accessable to anyone.

When the contract interpreter reads this keyword it simply hashes the actual string _"UNLOCKED"_ and uses the resulting digest as the symmetric vault key.

Scenario: Transfer Key Via Unlocked Vault
  Given the blank contract:
    """javascript
      {
        "header": {},
        "vaults": {
          "random_vault_key":{
            "description":"Random Number",
            "fill_with": "RANDOM_NUMBER",
            "lock_with": "MASTER_PASSPHRASE",
            "unlock_with": "MASTER_PASSPHRASE",
            "contents": ""
            },
          "message_locked_with_random":{
            "description":"A simple message locked with a random number",
            "fill_with": "EXTERNAL_DATA",
            "lock_with": "KEY['random_vault_key']",
            "unlock_with": "KEY['random_vault_key']",
            "contents": ""
          },
          "unlocked_random_key":{
            "description":"An unlocked random key",
            "fill_with": "KEY['random_vault_key']",
            "lock_with": "UNLOCKED",
            "unlock_with": "UNLOCKED",
            "contents": ""
          },
          "message_locked_with_unlocked_random_number":{
            "fill_with": "CONTENTS['message_locked_with_random']",
            "lock_with": "KEY['unlocked_random_key']",
            "unlock_with": "KEY['unlocked_random_key']",
            "contents": ""
          }
        }
      }
    """
  When I lock away a random vault key
  And I use the random key to lock a message
  And I put this random key in an unlocked vault
  Then another user can recover the message with the Unlocked Random Key

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vault-tree-0.3.4 features/keywords/unlocked.feature
vault-tree-0.3.3 features/keywords/unlocked.feature