diff --git a/docs/.nojekyll b/docs/.nojekyll deleted file mode 100644 index e69de29..0000000 diff --git a/docs/classes/_hash_.hash.html b/docs/classes/_hash_.hash.html index adff26b..36b892e 100644 --- a/docs/classes/_hash_.hash.html +++ b/docs/classes/_hash_.hash.html @@ -104,7 +104,7 @@
Hashes: Hashes = Hashes
@@ -121,7 +121,7 @@
  • Parameters

    diff --git a/docs/classes/_rsa_.rsa.html b/docs/classes/_rsa_.rsa.html index a5d36d5..c660160 100644 --- a/docs/classes/_rsa_.rsa.html +++ b/docs/classes/_rsa_.rsa.html @@ -104,7 +104,7 @@
  • Parameters

    @@ -131,7 +131,7 @@
  • Parameters

    @@ -158,7 +158,7 @@
  • Parameters

    diff --git a/docs/classes/_symmetric_.symmetric.html b/docs/classes/_symmetric_.symmetric.html index 32c6f86..5aaea59 100644 --- a/docs/classes/_symmetric_.symmetric.html +++ b/docs/classes/_symmetric_.symmetric.html @@ -107,7 +107,7 @@
    Ciphers: Ciphers = Ciphers
    @@ -117,7 +117,7 @@
    Encoding: BufferEncoding = "base64"
    @@ -134,7 +134,7 @@
  • @@ -169,7 +169,7 @@
  • @@ -210,7 +210,7 @@
  • Parameters

    diff --git a/docs/classes/_util_.base64.html b/docs/classes/_util_.base64.html index 4bd13f7..5a21ce4 100644 --- a/docs/classes/_util_.base64.html +++ b/docs/classes/_util_.base64.html @@ -103,7 +103,7 @@
  • Parameters

    @@ -126,7 +126,7 @@
  • Parameters

    diff --git a/docs/enums/_hash_.hashes.html b/docs/enums/_hash_.hashes.html index 8ff1139..0a5b4f5 100644 --- a/docs/enums/_hash_.hashes.html +++ b/docs/enums/_hash_.hashes.html @@ -96,7 +96,7 @@
    MD5: = "md5"
    @@ -106,7 +106,7 @@
    SHA1_1: = "sha1"
    @@ -116,7 +116,7 @@
    SHA1_256: = "sha256"
    @@ -126,7 +126,7 @@
    SHA1_512: = "sha512"
    @@ -136,7 +136,7 @@
    SHA3_256: = "sha3-256"
    @@ -146,7 +146,7 @@
    SHA3_384: = "sha3-384"
    @@ -156,7 +156,7 @@
    SHA3_512: = "sha3-512"
    diff --git a/docs/enums/_symmetric_.ciphers.html b/docs/enums/_symmetric_.ciphers.html index de339d0..604e3d1 100644 --- a/docs/enums/_symmetric_.ciphers.html +++ b/docs/enums/_symmetric_.ciphers.html @@ -96,7 +96,7 @@
    AES_128_CTR:
    @@ -106,7 +106,7 @@
    AES_128_GCM:
    @@ -116,7 +116,7 @@
    AES_192_CTR:
    @@ -126,7 +126,7 @@
    AES_192_GCM:
    @@ -136,7 +136,7 @@
    AES_256_CTR:
    @@ -146,7 +146,7 @@
    AES_256_GCM:
    @@ -156,7 +156,7 @@
    ChaCha20:
    diff --git a/docs/index.html b/docs/index.html index 6ac41e5..3a1470d 100644 --- a/docs/index.html +++ b/docs/index.html @@ -68,75 +68,29 @@

    High level wrapper around forge.

    Supports Hashes, Symmetric AES & ChaCha20 ciphers and Asymmetric RSA.

    Typescript typings included

    +

    📒 DOCS HERE 📒

    Quickstart 🚀

    Install
    -
    npm i node-forge occulto
    // Whatever import you prefer
    -// const { RSA } = require('occulto')
    -import { RSA } from 'occulto'
    +				
    npm i node-forge occulto

    Examples

    +

    RSA

    +
    import { RSA } from 'occulto'
     
     const pair = await RSA.gen()
    -
    -const encrypted = RSA.encrypt('some string', 'myPass')
    -const decrypted = RSA.decrypt(encrypted, 'myPass')
    -
    -

    Reference 📒

    -

    RSA

    -

    RSA.gen(size: number = 2 ** 12)

    -
      -
    • size: [optional, default=4096] Size of the RSA key
    • -
    -
    Examples
    -
    const pair = await RSA.gen() // 4096-Bit
    -const smallPair = await RSA.gen(2**10) // 1024-Bit
    -

    RSA.encrypt(data: string, key: PublicKey)

    -

    Encrypt message with public key

    -
    Example
    -
    const pair = await RSA.gen()
    -const encrypted = RSA.encrypt('some text', pair.pub)
    -

    RSA.decrypt(data: string, key: PrivateKey)

    -

    Decrypts a message encrypted with RSA.encrypt() with the private key

    -
    Example
    -
    const pair = await RSA.gen()
     const encrypted = RSA.encrypt('some text', pair.pub)
     const decrypted = RSA.decrypt(encrypted, pair.prv)
    -

    Symmetric

    -

    Symmetric.Ciphers

    -

    Available ciphers

    -
      -
    • Ciphers.ChaCha20
    • -
    • Ciphers.AES_256_GCM
    • -
    • Ciphers.AES_192_GCM
    • -
    • Ciphers.AES_128_GCM
    • -
    • Ciphers.AES_256_CTR
    • -
    • Ciphers.AES_192_CTR
    • -
    • Ciphers.AES_128_CTR
    • -
    -

    Symmetric.encrypt(data: string, key: string, type: Ciphers = Ciphers.AES_256_GCM)

    -

    Encrypts a string. - Defaults to Ciphers.AES_256_CTR

    -
    Examples
    -
    const encrypted = Symmetric.encrypt('some string' , 'myPass')
    +				

    Symmetric

    +

    Available Ciphers

    +
    import { Symmetric } from 'occulto'
     
    -const e = Symmetric.encrypt('some string' , 'myPass', Ciphers.AES_128_GCM)
    -

    Hash

    -

    Hash.Hashes

    -

    Available hashes

    -
      -
    • Hashes.MD5
    • -
    • Hashes.SHA1_1
    • -
    • Hashes.SHA1_256
    • -
    • Hashes.SHA1_512
    • -
    • Hashes.SHA3_256
    • -
    • Hashes.SHA3_384
    • -
    • Hashes.SHA3_512
    • -
    -

    Hash.digest(s: string, type: Hashes = Hashes.SHA3_256)

    -

    Calculates the hash of a string. - Defaults to Hashes.SHA3_256

    -
    Examples
    -
    const hash = Hash.digest('something')
    +const encrypted = Symmetric.encrypt('some string' , 'myPass', Symmetric.Ciphers.AES_128_GCM)
    +const decrypted = Symmetric.decrypt(encrypted, 'myPadd')
    +

    Hash

    +

    Available hashes

    +
    import { Hash } from 'occulto'
     
    -const h = Hash.digest('something', Hashes.MD5)
    +const hash = Hash.digest('something')
    +
    +const h = Hash.digest('something', Hash.Hashes.MD5)
     
    diff --git a/docs/modules/_index_.html b/docs/modules/_index_.html index 730e36e..1b48703 100644 --- a/docs/modules/_index_.html +++ b/docs/modules/_index_.html @@ -90,7 +90,7 @@
    Hash: Hash = H
    @@ -100,7 +100,7 @@
    RSA: RSA = R
    @@ -110,7 +110,7 @@
    Symmetric: Symmetric = S
    @@ -120,7 +120,7 @@
    Util: object = U
    diff --git a/docs/modules/_rsa_.html b/docs/modules/_rsa_.html index 39165b4..819bd13 100644 --- a/docs/modules/_rsa_.html +++ b/docs/modules/_rsa_.html @@ -95,7 +95,7 @@
    KeyPair: object
    @@ -116,7 +116,7 @@
    PrivateKey: string
    @@ -126,7 +126,7 @@
    PublicKey: string
    diff --git a/docs/modules/_symmetric_.html b/docs/modules/_symmetric_.html index 3eab7d7..2b00d0c 100644 --- a/docs/modules/_symmetric_.html +++ b/docs/modules/_symmetric_.html @@ -100,7 +100,7 @@
    CipherConfig: object
    @@ -127,7 +127,7 @@
    EncryptedItem: object
    diff --git a/docs/modules/_util_.html b/docs/modules/_util_.html index fb5e985..85fa104 100644 --- a/docs/modules/_util_.html +++ b/docs/modules/_util_.html @@ -98,7 +98,7 @@
  • @@ -124,7 +124,7 @@
  • Parameters