mirror of
https://github.com/VibedByKaKi/t3-code-android-nightly.git
synced 2026-10-25 22:27:22 +01:00
15 lines
539 B
TypeScript
15 lines
539 B
TypeScript
import * as Core from "@/Test/Core";
|
|
|
|
/**
|
|
* Cloud KMS never deletes key rings, and keeps destroyed keys for at least
|
|
* a day. Tests therefore reuse fixed ids, which the CryptoKey provider
|
|
* reclaims after destroy. Scope them by test stage so developers (and CI)
|
|
* sharing one project never contend for the same key.
|
|
*/
|
|
export const kmsTestId = (name: string) =>
|
|
`alchemy-test-${name}-${Core.defaultStage()}`
|
|
.toLowerCase()
|
|
.replace(/[^a-z0-9_-]/g, "-")
|
|
.slice(0, 63);
|
|
|
|
export const KEY_RING_ID = "alchemy-test-keyring";
|