[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FD3MKQ3SSTPVVGEARB3NDH":3,"skill-same:01M6FD3MKQ3SSTPVVGEARB3NDH":48},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":21,"linkOnly":22,"markdownContent":23,"markdownBody":23,"frontMatter":24,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":30,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M6FD3MKQ3SSTPVVGEARB3NDH","azure-keyvault-keys-ts",null,"ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fmicrosoft\u002Fskills\u002Fazure-keyvault-keys-ts\u002FSKILL.md",[],[18,19,20],"azure","azure keyvault keys ts","azure keyvault","2026-11-10 10:12:30",false,"# Azure Key Vault Keys SDK for TypeScript\n\nManage cryptographic keys with Azure Key Vault.\n\n## Installation\n\n```bash\n# Keys SDK\nnpm install @azure\u002Fkeyvault-keys @azure\u002Fidentity\n```\n\n## Environment Variables\n\n```bash\nKEY_VAULT_URL=https:\u002F\u002F\u003Cvault-name>.vault.azure.net\n# Or\nAZURE_KEYVAULT_NAME=\u003Cvault-name>\n```\n\n## Authentication\n\n```typescript\nimport { DefaultAzureCredential } from \"@azure\u002Fidentity\";\nimport { KeyClient, CryptographyClient } from \"@azure\u002Fkeyvault-keys\";\n\nconst credential = new DefaultAzureCredential();\nconst vaultUrl = `https:\u002F\u002F${process.env.AZURE_KEYVAULT_NAME}.vault.azure.net`;\n\nconst keyClient = new KeyClient(vaultUrl, credential);\nconst secretClient = new SecretClient(vaultUrl, credential);\n```\n\n## Secrets Operations\n\n### Create\u002FSet Secret\n\n```typescript\nconst secret = await secretClient.setSecret(\"MySecret\", \"secret-value\");\n\n\u002F\u002F With attributes\nconst secretWithAttrs = await secretClient.setSecret(\"MySecret\", \"value\", {\n  enabled: true,\n  expiresOn: new Date(\"2025-12-31\"),\n  contentType: \"application\u002Fjson\",\n  tags: { environment: \"production\" }\n});\n```\n\n### Get Secret\n\n```typescript\n\u002F\u002F Get latest version\nconst secret = await secretClient.getSecret(\"MySecret\");\nconsole.log(secret.value);\n\n\u002F\u002F Get specific version\nconst specificSecret = await secretClient.getSecret(\"MySecret\", {\n  version: secret.properties.version\n});\n```\n\n### List Secrets\n\n```typescript\nfor await (const secretProperties of secretClient.listPropertiesOfSecrets()) {\n  console.log(secretProperties.name);\n}\n\n\u002F\u002F List versions\nfor await (const version of secretClient.listPropertiesOfSecretVersions(\"MySecret\")) {\n  console.log(version.version);\n}\n```\n\n### Delete Secret\n\n```typescript\n\u002F\u002F Soft delete\nconst deletePoller = await secretClient.beginDeleteSecret(\"MySecret\");\nawait deletePoller.pollUntilDone();\n\n\u002F\u002F Purge (permanent)\nawait secretClient.purgeDeletedSecret(\"MySecret\");\n\n\u002F\u002F Recover\nconst recoverPoller = await secretClient.beginRecoverDeletedSecret(\"MySecret\");\nawait recoverPoller.pollUntilDone();\n```\n\n## Keys Operations\n\n### Create Keys\n\n```typescript\n\u002F\u002F Generic key\nconst key = await keyClient.createKey(\"MyKey\", \"RSA\");\n\n\u002F\u002F RSA key with size\nconst rsaKey = await keyClient.createRsaKey(\"MyRsaKey\", { keySize: 2048 });\n\n\u002F\u002F Elliptic Curve key\nconst ecKey = await keyClient.createEcKey(\"MyEcKey\", { curve: \"P-256\" });\n\n\u002F\u002F With attributes\nconst keyWithAttrs = await keyClient.createKey(\"MyKey\", \"RSA\", {\n  enabled: true,\n  expiresOn: new Date(\"2025-12-31\"),\n  tags: { purpose: \"encryption\" },\n  keyOps: [\"encrypt\", \"decrypt\", \"sign\", \"verify\"]\n});\n```\n\n### Get Key\n\n```typescript\nconst key = await keyClient.getKey(\"MyKey\");\nconsole.log(key.name, key.keyType);\n```\n\n### List Keys\n\n```typescript\nfor await (const keyProperties of keyClient.listPropertiesOfKeys()) {\n  console.log(keyProperties.name);\n}\n```\n\n### Rotate Key\n\n```typescript\n\u002F\u002F Manual rotation\nconst rotatedKey = await keyClient.rotateKey(\"MyKey\");\n\n\u002F\u002F Set rotation policy\nawait keyClient.updateKeyRotationPolicy(\"MyKey\", {\n  lifetimeActions: [{ action: \"Rotate\", timeBeforeExpiry: \"P30D\" }],\n  expiresIn: \"P90D\"\n});\n```\n\n### Delete Key\n\n```typescript\nconst deletePoller = await keyClient.beginDeleteKey(\"MyKey\");\nawait deletePoller.pollUntilDone();\n\n\u002F\u002F Purge\nawait keyClient.purgeDeletedKey(\"MyKey\");\n```\n\n## Cryptographic Operations\n\n### Create CryptographyClient\n\n```typescript\nimport { CryptographyClient } from \"@azure\u002Fkeyvault-keys\";\n\n\u002F\u002F From key object\nconst cryptoClient = new CryptographyClient(key, credential);\n\n\u002F\u002F From key ID\nconst cryptoClient = new CryptographyClient(key.id!, credential);\n```\n\n### Encrypt\u002FDecrypt\n\n```typescript\n\u002F\u002F Encrypt\nconst encryptResult = await cryptoClient.encrypt({\n  algorithm: \"RSA-OAEP\",\n  plaintext: Buffer.from(\"My secret message\")\n});\n\n\u002F\u002F Decrypt\nconst decryptResult = await cryptoClient.decrypt({\n  algorithm: \"RSA-OAEP\",\n  ciphertext: encryptResult.result\n});\n\nconsole.log(decryptResult.result.toString());\n```\n\n### Sign\u002FVerify\n\n```typescript\nimport { createHash } from \"node:crypto\";\n\n\u002F\u002F Create digest\nconst hash = createHash(\"sha256\").update(\"My message\").digest();\n\n\u002F\u002F Sign\nconst signResult = await cryptoClient.sign(\"RS256\", hash);\n\n\u002F\u002F Verify\nconst verifyResult = await cryptoClient.verify(\"RS256\", hash, signResult.result);\nconsole.log(\"Valid:\", verifyResult.result);\n```\n\n### Wrap\u002FUnwrap Keys\n\n```typescript\n\u002F\u002F Wrap a key (encrypt it for storage)\nconst wrapResult = await cryptoClient.wrapKey(\"RSA-OAEP\", Buffer.from(\"key-material\"));\n\n\u002F\u002F Unwrap\nconst unwrapResult = await cryptoClient.unwrapKey(\"RSA-OAEP\", wrapResult.result);\n```\n\n## Backup and Restore\n\n```typescript\n\u002F\u002F Backup\nconst keyBackup = await keyClient.backupKey(\"MyKey\");\nconst secretBackup = await secretClient.backupSecret(\"MySecret\");\n\n\u002F\u002F Restore (can restore to different vault)\nconst restoredKey = await keyClient.restoreKeyBackup(keyBackup!);\nconst restoredSecret = await secretClient.restoreSecretBackup(secretBackup!);\n```\n\n## Key Types\n\n```typescript\nimport {\n  KeyClient,\n  KeyVaultKey,\n  KeyProperties,\n  DeletedKey,\n  CryptographyClient,\n  KnownEncryptionAlgorithms,\n  KnownSignatureAlgorithms\n} from \"@azure\u002Fkeyvault-keys\";\n\nimport {\n  SecretClient,\n  KeyVaultSecret,\n  SecretProperties,\n  DeletedSecret\n} from \"@azure\u002Fkeyvault-secrets\";\n```\n\n## Error Handling\n\n```typescript\ntry {\n  const secret = await secretClient.getSecret(\"NonExistent\");\n} catch (error: any) {\n  if (error.code === \"SecretNotFound\") {\n    console.log(\"Secret does not exist\");\n  } else {\n    throw error;\n  }\n}\n```\n\n## Best Practices\n\n1. **Use DefaultAzureCredential** - Works across dev and production\n2. **Enable soft-delete** - Required for production vaults\n3. **Set expiration dates** - On both keys and secrets\n4. **Use key rotation policies** - Automate key rotation\n5. **Limit key operations** - Only grant needed operations (encrypt, sign, etc.)\n6. **Browser not supported** - These SDKs are Node.js only\n",{},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Fmicrosoft\u002Fskills\u002Fazure-keyvault-keys-ts",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":7,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill azure-keyvault-keys-ts",{"tool":40,"command":41},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill azure-keyvault-keys-ts",{"tool":43,"command":44},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill azure-keyvault-keys-ts","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fmicrosoft\u002Fskills\u002Fazure-keyvault-keys-ts\u002FSKILL.md",true,[],[49,58,67,76,82,88],{"skillNo":50,"name":51,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":21},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[55,56,57],"model","model hierarchy","model hierarchy skill",{"skillNo":59,"name":60,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":21},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[64,65,66],"MCP","zoom","zoom mcp",{"skillNo":68,"name":69,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":21},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[73,74,75,65],"sdk","zoom apps sdk","apps",{"skillNo":77,"name":78,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":21},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[78],{"skillNo":83,"name":84,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":21},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[84],{"skillNo":89,"name":90,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":21},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[90]]