{"_id":"@bonosoft/sveltekit-base32","name":"@bonosoft/sveltekit-base32","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@bonosoft/sveltekit-base32","description":"Encode or Decode strings or arrays to and from base32","version":"0.0.1","author":{"name":"Bonosoft"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/bonosoft/sveltekit-base32.git"},"bugs":{"url":"https://github.com/bonosoft/sveltekit-base32/issues"},"keywords":["svelte","sveltekit","base32","encode","decode","encodestring","decodestring","totp","onetime","password"],"scripts":{"dev":"vite dev","build":"vite build && npm run package","preview":"vite preview","package":"svelte-kit sync && svelte-package && publint","prepublishOnly":"npm run package","check":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json","check:watch":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch","publish":"npm publish --access public"},"exports":{".":{"types":"./dist/index.d.ts","svelte":"./dist/index.js"}},"peerDependencies":{"svelte":"^3.54.0"},"devDependencies":{"@sveltejs/adapter-auto":"^2.0.0","@sveltejs/kit":"^1.5.0","@sveltejs/package":"^2.0.0","publint":"^0.1.9","svelte":"^3.54.0","svelte-check":"^3.0.1","tslib":"^2.4.1","typescript":"^5.0.0","vite":"^4.2.0"},"svelte":"./dist/index.js","types":"./dist/index.d.ts","type":"module","gitHead":"f5e681f8eae81a1c671911c5e2e1917870cd7887","homepage":"https://github.com/bonosoft/sveltekit-base32#readme","_id":"@bonosoft/sveltekit-base32@0.0.1","_nodeVersion":"18.14.0","_npmVersion":"9.4.2","dist":{"integrity":"sha512-+5YST/rdAbqIVe5nYe0AdDwOk0KODWtPCJ4eLtkugfncYmHqlH5jUr7xv961ZOVZyCNQx02GMoUtlQhULXDUZA==","shasum":"0b95bbcbdedf93753e76c1eb601825c9df87aaaa","tarball":"https://registry.npmjs.org/@bonosoft/sveltekit-base32/-/sveltekit-base32-0.0.1.tgz","fileCount":7,"unpackedSize":9277,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICEr6E/yxx3IdKLmm1gyKF7S6WczcdWlwI/LcmVZZA7gAiBNXOWj5X+RBEwIqvuaBozJ9NITxn8iRLys9LbElMRjKQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkMIVlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqPLA//cSwHa+v3Mp6a9mbgCXrf4Oxj0m1xJ+V1ACEHjzhdeZJOEK4x\r\nJ/9ZYFJI18JVH8HuZklvMT6ZjgJDSRvGrWeCU9GLngwPh+gUfZNTiupTzF7h\r\nT2k6xZTeHibSqxU/nW6X1+OfpLdbybU9Qr4uc1NpyXKBhLSY3AZ9dBnC8LoB\r\nCRY25ogy9OW5OTOBKtDZQqP+4fJKNMwwKucV7WoQfxRxW//AKI3TU7Qh7mxr\r\nQTtVMckyPhfVvViawkYb1hColvk3/Ar1sDO9zJ7JuKu7/X5hAlwK08XedtCX\r\n5JPhdqWzTM/cTBgQuMw9d/TqKOwQqB9pQCLxWkWOqRNYkJOQaFFxQuKZrVW7\r\nRP3TQlfuWgRNew9gZFIX78nLToSjsfGU/5W3N16RsbBYxNwi/5NSLdyIJN3m\r\n2Rab6b25H3kM2M7gwWKmXbzciGoItTx6bVG7uV0Cud6/ksMJx5mCP/LTC0zT\r\nMWO78DpdZ2VQN5296QBaoZ9XcUYdYXtGIJayKawD/PaWKhVcjEaZCOvVT2Gi\r\nW3zRop7upf2a1Kp+V7l+3KOZLKkue3gshrj8n+Db/Wr4+oR7V8Wpm/JSV07O\r\n/GmKVGU3lKEpMcFBJDNufOVlpp0cxjgFawrAohrlDQ320+5lF1DhDujE8flD\r\nwljw5ttdxf+bSFNaxIGL+8ljHZKPK2GSTVc=\r\n=qDAi\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bonosoft","email":"bo.n@rgaard.net"},"directories":{},"maintainers":[{"name":"bonosoft","email":"bo.n@rgaard.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sveltekit-base32_0.0.1_1680901477099_0.9859810711356085"},"_hasShrinkwrap":false}},"time":{"created":"2023-04-07T21:04:37.037Z","0.0.1":"2023-04-07T21:04:37.255Z","modified":"2023-04-07T21:04:37.463Z"},"maintainers":[{"name":"bonosoft","email":"bo.n@rgaard.net"}],"description":"Encode or Decode strings or arrays to and from base32","homepage":"https://github.com/bonosoft/sveltekit-base32#readme","keywords":["svelte","sveltekit","base32","encode","decode","encodestring","decodestring","totp","onetime","password"],"repository":{"type":"git","url":"git+https://github.com/bonosoft/sveltekit-base32.git"},"author":{"name":"Bonosoft"},"bugs":{"url":"https://github.com/bonosoft/sveltekit-base32/issues"},"license":"MIT","readme":"# Base32 encode or decode for SvelteKit\nWith this module, you are able use base32 encoding on you Sveltekit site. \n\n## Install\nUse your package manager to install the module:\n```shell\nnpm install @bonosoft/sveltekit-base32\n```\n\n## Using base32 in a svelte file in SvelteKit\nNow you can start using the Base32 class in your pages.\n```ts\n<script lang=\"ts\">\n  import Base32 from \"@bonosoft/sveltekit-base32\"\n  const base32 = new Base32();\n</script>\n```\n\n## Encode or EncodeString\nWith the encode you can use base32 to tranform your data info a string of standard capital letters and digits. The encoding is not an encryption, and can easily be transformed back into the original data.\n```ts\n    var myEncodedString = base32.encodeString(\"mySecret\");\n\n    const secret = new Uint8Array(10);\n    for(let i=0; i<10; i++) {\n        secret[i] = Math.floor(Math.random() * 256);\n    }\n    let base32secret: string = base32.encode(secret);\n```\n\n## Decode or DecodeString\nThe decode functions return the base32 strings back into your original data.\n```ts\n    var mySecret : string = base32.decodeString(\"NV4VGZLDOJSXI===\");\n\n    console.log( base32.decode(\"5GJGHSQGJXXNSB5Y\") );\n```\n\n## TOTP Time based One Time Password secrets\nMost TOTP applications requires that your shared secret is a base32 encoded string.<br>\nIn your browser you are able to make a more secure random secret for your TOTP app.\n```ts\n    const secret = new Uint8Array(10);\n    self.crypto.getRandomValues(secret);\n\n    let totpsecret: string = base32.encode(secret);\n\n```\n","readmeFilename":"README.md"}