(...parts: readonly string[])
| 930 | // --------------------------------------------------------------------------- |
| 931 | |
| 932 | const stableMigrationHash = (...parts: readonly string[]): string => { |
| 933 | const hash = createHash("sha256"); |
| 934 | for (const part of parts) hash.update(part).update("\0"); |
| 935 | return hash.digest("base64url"); |
| 936 | }; |
| 937 | |
| 938 | export const migratedItemId = (scopeId: string, secretId: string): string => |
| 939 | `secret_${stableMigrationHash(scopeId, secretId)}`; |
no test coverage detected