Showing the changes to packages/ssh/src/command.ts (1 of 71 files). Show all
Unified · Split
| @@ -1,4 +1,4 @@ | |||
| 1 | import * as Crypto from "node:crypto"; | 1 | import * as NodeCrypto from "node:crypto"; |
| 2 | 2 | ||
| 3 | import type { DesktopSshEnvironmentTarget, DesktopUpdateChannel } from "@t3tools/contracts"; | 3 | import type { DesktopSshEnvironmentTarget, DesktopUpdateChannel } from "@t3tools/contracts"; |
| 4 | import { HostProcessPlatform } from "@t3tools/shared/hostProcess"; | 4 | import { HostProcessPlatform } from "@t3tools/shared/hostProcess"; |
| @@ -74,7 +74,10 @@ export function targetConnectionKey(target: DesktopSshEnvironmentTarget): string · 69 unmodified lines | |||
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | export function remoteStateKey(target: DesktopSshEnvironmentTarget): string { | 76 | export function remoteStateKey(target: DesktopSshEnvironmentTarget): string { |
| 77 | return Crypto.createHash("sha256").update(targetConnectionKey(target)).digest("hex").slice(0, 16); | 77 | return NodeCrypto.createHash("sha256") |
| 78 | .update(targetConnectionKey(target)) | ||
| 79 | .digest("hex") | ||
| 80 | .slice(0, 16); | ||
| 78 | } | 81 | } |
| 79 | 82 | ||
| 80 | export function buildSshHostSpec(target: DesktopSshEnvironmentTarget): string { | 83 | export function buildSshHostSpec(target: DesktopSshEnvironmentTarget): string { |