{"id":18335816,"url":"https://github.com/evervault/template-hello-cage","last_synced_at":"2025-04-09T19:50:36.668Z","repository":{"id":47725445,"uuid":"311716565","full_name":"evervault/template-hello-cage","owner":"evervault","description":"Evervault template Hello World Cage.","archived":false,"fork":false,"pushed_at":"2021-08-16T10:56:53.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-15T12:16:53.548Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/evervault.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-10T16:19:07.000Z","updated_at":"2024-03-13T19:55:18.000Z","dependencies_parsed_at":"2022-08-20T04:00:53.783Z","dependency_job_id":null,"html_url":"https://github.com/evervault/template-hello-cage","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evervault%2Ftemplate-hello-cage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evervault%2Ftemplate-hello-cage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evervault%2Ftemplate-hello-cage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evervault%2Ftemplate-hello-cage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evervault","download_url":"https://codeload.github.com/evervault/template-hello-cage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248103876,"owners_count":21048243,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T20:04:58.475Z","updated_at":"2025-04-09T19:50:36.635Z","avatar_url":"https://github.com/evervault.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hello Cage\n[Evervault](https://evervault.com) makes it easy to encrypt data at source, process it in a Cage — a secure, serverless function — and never store it unencrypted.\n\nThis is a simple Evervault Cage example, to help get you up and running on the Evervault platform quickly.\n\n## Getting started with Evervault\n\nEvervault consists of two parts, encrypting your data at source, using either our Node SDK, or Browser and React SDKs and then sending that encrypted data to a Cage to be processed securely.\n\nThis Cage takes a payload that should contain a `name` key. Running the Cage is very simple.\n\n## The steps\n1. Encrypt your data at source, using either the Node SDK or Browser and React SDKs.\n2. Process the encrypted data in a Cage\n\n### Encrypting at source\n```javascript\n// This example uses the Evervault Node SDK.\nconst Evervault = require('@evervault/sdk');\n\n// Initialize the client with your team’s API key\nconst evervault = new Evervault('\u003cYOUR-API-KEY\u003e');\n\n// Encrypt your data\nconst encrypted = await evervault.encrypt({ name: 'Claude Shannon' });\n```\n\n### Process your encrypted data in a Cage\nYou should encrypt this payload using either our Node SDK or Browser SDK, then run it in the Hello Cage:\n\n```javascript\n// Process the encrypted data in a Cage\nconst result = await evervault.run('hello-cage', encrypted);\n```\n\n## Understanding the Cage\nThis Cage is very simple. Here is the full code:\n\n```javascript\nexports.handler = async (data) =\u003e {\n  if (data.name \u0026\u0026 typeof data.name === \"string\") {\n    console.debug(`A name of length ${data.name.length} has arrived into the Cage.`);\n\n    return {\n      message: `Hello from a Cage! It seems you have ${data.name.length} letters in your name`,\n      name: await evervault.encrypt(data.name),\n    };\n  } else {\n    console.debug('An empty name has arrived into the Cage.');\n\n    return {\n      message: 'Hello from a Cage! Send an encrypted `name` parameter to show Cage decryption in action',\n    };\n  }\n};\n```\n\nOr check it out in [index.js](./index.js).\n\n--- \nIf you want to know more about Evervault, check out our [documentation](https://docs.evervault.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevervault%2Ftemplate-hello-cage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevervault%2Ftemplate-hello-cage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevervault%2Ftemplate-hello-cage/lists"}