mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
21 lines
629 B
TypeScript
21 lines
629 B
TypeScript
import type { CoreService, EncryptionService } from '../core/tokens'
|
|
|
|
/**
|
|
* Encryption module — bootstrap page/shortcode decryption via FixItDecryptor.
|
|
*
|
|
* Responsibilities:
|
|
* - Initialize FixItDecryptor for full-page and shortcode-scoped decryption.
|
|
*/
|
|
export class EncryptionModule implements EncryptionService {
|
|
constructor(private readonly core: CoreService) {}
|
|
|
|
/** Initialize FixItDecryptor with encryption config. */
|
|
setup() {
|
|
if (!this.core.config.encryption || !window.FixItDecryptor)
|
|
return
|
|
const decryptor = new window.FixItDecryptor()
|
|
|
|
decryptor.init(this.core.config.encryption)
|
|
}
|
|
}
|