PageSourceSearch

https://encrypt-qr-codes.netlify.app/_next/static/chunks/app/encrypt/page-b7318d5cf7c44cc5.js

js encrypt-qr-codes.netlify.app collected 2026-10-03 10:42:16 UTC 2,657 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[402],{2196:function(e,t,s){Promise.resolve().then(s.bind(s,7725))},7725:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return y}});var n=s(7437),r=s(3548),o=s(9609),a=s(741),i=s(2959),l=s(6287),c=s(3116),d=s(22),p=s(3759),h=s(6136),u=s(5212),m=s(136),f=s(2537),x=s(2265);function y(){let[e,t]=(0,x.useState)(null),[s,r]=(0,x.useState)(!1);return(0,n.jsxs)(d.Z,{title:"Encrypt QR Codes",children:[(0,n.jsxs)(p.E,{children:[(0,n.jsx)(j,{setQrCodeInfo:t,setIsEncrypting:r}),(0,n.jsx)(i.Z,{title:"Encrypted QR Code",isLoading:s,qrCodeInfo:e,getFileName:e=>"qr-encrypted-".concat(e.date,"-").concat(e.hint)})]}),(0,n.jsx)(c.Z,{faqs:l.j1})]})}async function b(e){let{qrCodeData:t,hint:s,pass1:n,pass2:a}=e;if(n!==a)throw Error("Passwords do not match");let i=await (0,r.l)(crypto,t,s,n),l=(0,o.te)(JSON.stringify(i),{title:i.hint,date:i.date,showLockSymbol:!0,showWebsiteUrl:!0});return console.info("Generated encrypted QR Code:"),console.table({plainText:t,...i}),{svgHtml:l,dataEncrypted:i,dataDecrypted:t}}function j(e){return(0,n.jsx)(f.J9,{initialValues:{image:"",qrCodeData:"",hint:"",pass1:"",pass2:""},onSubmit:async(t,s)=>{e.setQrCodeInfo(null),e.setIsEncrypting(!0),await b(t).then(e.setQrCodeInfo).catch(e=>{console.info(e),s.setErrors((0,a.e$)(e))}),e.setIsEncrypting(!1)},children:e=>{let{isValid:t,errors:s,values:{pass1:r,qrCodeData:o}}=e;return(0,n.jsx)(p.s,{title:"Encrypt a QR Code",icon:(0,n.jsx)(m.Z,{className:"-mt-0.5 mr-2 h-6 w-6 text-gray-300"}),hasError:"string"==typeof s,children:(0,n.jsxs)(f.l0,{className:"flex flex-1 flex-col space-y-4",children:[(0,n.jsx)(h.Z,{showTypeMode:!0,demoSrc:"/demo/qr-code-plain.png",demoDescription:"Demo QR Code"}),(0,n.jsx)(u.Z,{name:"hint",label:"Hint",description:"Unencrypted text to remember what the QR code is for.",minLength:3,disabled:!o,placeholder:"Google Account"}),(0,n.jsx)(u.Z,{name:"pass1",label:"Password",type:"password",description:"Make it secure but memorable as this is unrecoverable.",minLength:12,disabled:!o,placeholder:"hunter2"}),(0,n.jsx)(u.Z,{name:"pass2",label:"Confirm Password",type:"password",description:"To ensure that you didn't mistype it.",minLength:r.length||12,disabled:!o,placeholder:"hunter2"}),(0,n.jsx)("div",{className:"flex-1"}),"string"==typeof s&&(0,n.jsx)("p",{className:"text-red-500",children:s}),(0,n.jsxs)("button",{type:"submit",className:"action-button mt-1",disabled:!(o&&t),children:[(0,n.jsx)(m.Z,{className:"mr-1 h-5 w-5"}),(0,n.jsx)("span",{children:"Encrypt"})]})]})})}})}}},function(e){e.O(0,[250,509,684,137,971,938,744],function(){return e(e.s=2196)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.