Skip to content

Commit 421d90e

Browse files
committed
longer timeout
1 parent 3c93bbd commit 421d90e

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
> Encrypt and decrypt secrets using your SSH agent — no plaintext, no extra key management.
99
10-
Inspired by [node-ssh-agent](https://github.com/mcavage/node-ssh-agent) and [ssh-crypt.bash](https://gist.github.com/davisford/2949118)
10+
Inspired by [node-ssh-agent](https://github.com/mcavage/node-ssh-agent) and [ssh-crypt.bash](https://gist.github.com/wmertens/c4f2c4186c04dc5442bbe3396f2c12f6)
1111

1212
## ✨ Overview
1313

@@ -25,11 +25,12 @@ A seed is used to generate the secret, it's recommended you don't use the same s
2525
- 🧩 Minimal and portable
2626
- 🔨 Node library included to decrypt secrets on-the-fly in your code
2727
- 📦 Safe to store encrypted secrets in Git
28+
- `node:stream` compatible
2829
- 👥 Works with existing SSH agent workflows like [1Password](https://developer.1password.com/docs/ssh/agent/) or [Bitwarden](https://bitwarden.com/help/ssh-agent/)
2930

3031
## ⚠️ Limitations
3132

32-
- We can't use ecdsa/ed25519 keys, they always give different signatures.
33+
- Can't use ecdsa/ed25519 keys, they always give different signatures
3334

3435
## 💻 CLI usage
3536

@@ -80,13 +81,15 @@ const encrypted = await agent.encrypt(
8081
identity,
8182
'not_a_secret_but_a_seed',
8283
Buffer.from('Lorem ipsum dolor', 'utf8'),
84+
'hex',
8385
)
8486
console.log('Encrypted data:', encrypted)
8587

8688
const decrypted = await agent.decrypt(
8789
identity,
8890
'not_a_secret_but_a_seed',
8991
encrypted,
92+
'hex',
9093
)
9194
console.log('Decrypted data:', decrypted.toString('utf8'))
9295
```

src/lib/ssh_agent_client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ export class SSHAgentClient {
7777
* @throws {Error} if SSH_AUTH_SOCK is not set.
7878
*/
7979
constructor(options: SSHAgentClientOptions = {}) {
80-
/** Socket operation timeout in milliseconds (default: 1000) */
81-
this.timeout = options.timeout ?? 1000
80+
/** Socket operation timeout in milliseconds (default: 10000) */
81+
this.timeout = options.timeout ?? 10000
8282

8383
/** Encryption and algo key length must match */
8484
this.cipherAlgo = options.cipherAlgo ?? 'aes-256-cbc'

0 commit comments

Comments
 (0)