getEnvironmentKey() — astro Function Reference
Architecture documentation for the getEnvironmentKey() function in encryption.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 2e78015b_b90e_b5de_eed6_2a54c3b36e62["getEnvironmentKey()"] 94fbb11e_4aa9_9dfd_28d5_cc0eb8749e6c["encryption.ts"] 2e78015b_b90e_b5de_eed6_2a54c3b36e62 -->|defined in| 94fbb11e_4aa9_9dfd_28d5_cc0eb8749e6c 21cb83dc_d749_8188_8ab4_adc6585a6aa9["hasEnvironmentKey()"] 2e78015b_b90e_b5de_eed6_2a54c3b36e62 -->|calls| 21cb83dc_d749_8188_8ab4_adc6585a6aa9 0362cb4d_7879_467e_b7ae_71cd85a7ac83["getEncodedEnvironmentKey()"] 2e78015b_b90e_b5de_eed6_2a54c3b36e62 -->|calls| 0362cb4d_7879_467e_b7ae_71cd85a7ac83 4b6575c8_cd95_5f6e_51d9_80ca1c627f56["decodeKey()"] 2e78015b_b90e_b5de_eed6_2a54c3b36e62 -->|calls| 4b6575c8_cd95_5f6e_51d9_80ca1c627f56 style 2e78015b_b90e_b5de_eed6_2a54c3b36e62 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/core/encryption.ts lines 45–54
export async function getEnvironmentKey(): Promise<CryptoKey> {
// This should never happen, because we always check `hasEnvironmentKey` before this is called.
if (!hasEnvironmentKey()) {
throw new Error(
`There is no environment key defined. If you see this error there is a bug in Astro.`,
);
}
const encodedKey = getEncodedEnvironmentKey();
return decodeKey(encodedKey);
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does getEnvironmentKey() do?
getEnvironmentKey() is a function in the astro codebase, defined in packages/astro/src/core/encryption.ts.
Where is getEnvironmentKey() defined?
getEnvironmentKey() is defined in packages/astro/src/core/encryption.ts at line 45.
What does getEnvironmentKey() call?
getEnvironmentKey() calls 3 function(s): decodeKey, getEncodedEnvironmentKey, hasEnvironmentKey.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free