Files
locker/example/src/secret-content.secret.tsx
T
Vitalii Litvinchuk dc8c379ecf init
2026-06-10 15:09:45 +03:00

29 lines
1011 B
TypeScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import React from "react";
/**
* Secret content — plain React Component.
*
* The Vite plugin 'cryptoLockerPlugin' automatically encrypts
* this module's source code during build/dev. In the build artifacts,
* there will be only an AES-encrypted string.
*
* Test password (in .env): my-super-secret-password
*/
export default function SecretComponent() {
return (
<div className="secret-content" style={{ marginTop: "1rem" }}>
<div className="secret-content__badge" style={{ color: "green", fontWeight: "bold" }}>
Decrypted
</div>
<p className="secret-content__message" style={{ fontSize: "1.2rem", marginTop: "0.5rem" }}>
Success from a React Component!
</p>
<ul style={{ marginTop: "1rem", textAlign: "left", display: "inline-block", color: "#555" }}>
<li>🔐 Encrypted at build time</li>
<li>🛡 Decrypted and evaluated at runtime</li>
<li>🚀 Fully functional React component</li>
</ul>
</div>
);
}