Skip to content

Commit

Permalink
docs: generate docs [skip-ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jun 20, 2023
1 parent 13e47bb commit c4a9435
Show file tree
Hide file tree
Showing 139 changed files with 10,387 additions and 99 deletions.
137 changes: 137 additions & 0 deletions docs/api/1.0.0-SNAPSHOT/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,143 @@
<div class="main-content" id="content" pageIds="Kipher::.ext/allModules///PointingToDeclaration//0">
<div class="breadcrumbs"></div>
<div class="cover ">
<div class="cover ">
<h1 class="">Kipher</h1>
<p class="paragraph"><a href="https://app.codacy.com/gh/jhdcruz/kipher/dashboard"></a></p>
<p class="paragraph">Abstracted cryptographic library for straightforward & hassle-free cryptographic operations for JVM applications.</p>
<h3 class=""> Features:</h3>
<h4 class=""> Encryption</h4>
<ul>
<li>
<p class="paragraph"><a href="https://bouncycastle.org/">Bouncy Castle</a> Security Provider</p>
</li>
<li>
<p class="paragraph">AES</p>
</li>
<ul>
<li>
<p class="paragraph"><code class="lang-kotlin">AES/GCM/NoPadding</code> <i>(Recommended)</i></p>
</li>
<li>
<p class="paragraph"><code class="lang-kotlin">AES/CCM/NoPadding</code></p>
</li>
<li>
<p class="paragraph"><code class="lang-kotlin">AES/CBC/PKCS7Padding</code></p>
</li>
<li>
<p class="paragraph"><code class="lang-kotlin">AES/CTR/NoPadding</code></p>
</li>
<li>
<p class="paragraph"><code class="lang-kotlin">AES/CFB/NoPadding</code></p>
</li>
</ul>
<li>
<p class="paragraph">and more to be implemented...</p>
</li>
</ul>
<blockquote class="quotation">
<p class="paragraph"><strong>Note</strong></p>
<p class="paragraph">If you don't know which one to use, stick with the <code class="lang-kotlin">recommended</code> based on your chosen encryption method.</p>
</blockquote>
<h2 class=""> Usage</h2>
<blockquote class="quotation">
<p class="paragraph"><a href="https://jhdcruz.github.io/kipher/">API documentation</a></p>
</blockquote>
<p class="paragraph">Unfortunately, <strong>The library is not yet available in Maven Central.</strong></p>
<details>
<summary>Other ways to use the library</summary> <p class="paragraph">These methods are untested, but should work.</p>
<ul>
<li>
<p class="paragraph">You can use <a href="https://jitpack.io/">JitPack</a> to add the library in your project.</p>
</li>
<li>
<p class="paragraph">Using the package directly from GitHub Packages.</p>
</li>
<ul>
<li>
<p class="paragraph"><a href="https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry#using-a-published-package">Gradle</a></p>
</li>
<li>
<p class="paragraph"><a href="https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry#installing-a-package">Maven</a></p>
</li>
</ul>
<li>
<p class="paragraph">Download the latest <code class="lang-kotlin">.jar</code> release from <a href="https://github.com/jhdcruz/kipher/releases/latest">here</a>, and manually add it to your project.</p>
<ul>
<li>
<p class="paragraph"><a href="https://stackoverflow.com/questions/2824515/how-to-add-external-library-properly-in-eclipse">Eclipse</a></p>
</li>
<li>
<p class="paragraph"><a href="https://www.jetbrains.com/help/idea/library.html#define-library">IntelliJ IDEA</a></p>
</li>
<li>
<p class="paragraph"><a href="https://stackoverflow.com/questions/4879903/how-to-add-a-jar-in-netbeans">Netbeans</a></p>
</li>
</ul>
<blockquote class="quotation">
<p class="paragraph">This method also requires <code class="lang-kotlin">kipher-common</code>.</p>
</blockquote>
</li>
</ul>
</details> <h3 class=""> Kotlin</h3>
<p class="paragraph">Using the library in kotlin is as easy as importing it:</p>
<div class="sample-container">
<pre><code class="block lang-kotlin" theme="idea">import io.github.jhdcruz.kipher.aes.GcmEncryption<br><br>class EncryptionTest {<br> fun main() {<br> val encryptionUtils = GcmEncryption()<br><br> val data = &quot;sample data&quot;.encodeToByteArray()<br> val aad = &quot;sample aad&quot;.encodeToByteArray()<br><br> // named parameters are recommended, but optional<br> val encrypted = gcmEncryption.encrypt(<br> data = message,<br> aad = aad,<br> ) // returns Map&lt;String, ByteArray&gt; of [data, key]<br><br> val decrypted = gcmEncryption.decrypt(encrypted)<br><br> // or<br><br> val decrypted = gcmEncryption.decrypt(<br> encrypted = encrypted.getValue(&quot;data&quot;),<br> key = encrypted.getValue(&quot;key&quot;)<br> )<br><br> println(decryptedPass.toString(), Charsets.UTF_8) // outputs &quot;sample data&quot;<br> }<br>}</code></pre>
<span class="top-right-position"><span class="copy-icon"></span>
<div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div>
</span></div>
<h3 class=""> Java (Non-kotlin)</h3>
<div class="sample-container">
<pre><code class="block lang-java" theme="idea">import io.github.jhdcruz.kipher.aes.GcmEncryption;<br><br>import java.util.Map;<br><br>public class Main {<br> public static void main(String[] args) {<br> GcmEncryption encryptionUtils = new GcmEncryption();<br><br> byte[] data = &quot;Hello World&quot;.getBytes();<br><br> Map&lt;String, byte[]&gt; encrypted = encryptionUtils.encrypt(data);<br><br> byte[] val = encryptionUtils.decrypt(encrypted);<br><br> // or<br><br> byte[] val = encryptionUtils.decrypt(<br> encrypted.get(&quot;data&quot;),<br> encrypted.get(&quot;key&quot;)<br> );<br><br> System.out.println(new String(val)); // outputs &quot;Hello World&quot;<br> }<br>}</code></pre>
<span class="top-right-position"><span class="copy-icon"></span>
<div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div>
</span></div>
<h3 class=""> Using different key size</h3>
<div class="sample-container">
<pre><code class="block lang-kotlin" theme="idea">import io.github.jhdcruz.kipher.aes.GcmEncryption<br><br>class EncryptionTest {<br> fun main() {<br> val encryptionUtils = CbcEncryption()<br><br> val data = &quot;sample data&quot;.encodeToByteArray()<br> val secretKey: ByteArray = encryptionUtils.generateKey(128)<br><br> val encrypted = gcmEncryption.encrypt(<br> data = message,<br> key = secretKey<br> )<br><br> val decrypted = gcmEncryption.decrypt(encrypted)<br><br> println(decryptedPass.toString(), Charsets.UTF_8) // outputs &quot;sample data&quot;<br> }<br>}</code></pre>
<span class="top-right-position"><span class="copy-icon"></span>
<div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div>
</span></div>
<blockquote class="quotation">
<p class="paragraph"><strong>Note</strong></p>
<p class="paragraph">If your project uses earlier JDK 8, you might need <a href="https://www.oracle.com/java/technologies/javase-jce-all-downloads.html">Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files</a> for the library to function properly.</p>
<p class="paragraph"><i>See more: https://stackoverflow.com/a/3864276</i></p>
</blockquote>
<h4 class=""> Methods</h4>
<p class="paragraph">There are 4 methods you'll primarily use:</p>
<ul>
<li>
<p class="paragraph"><code class="lang-kotlin">encrypt</code></p>
</li>
<li>
<p class="paragraph"><code class="lang-kotlin">decrypt</code></p>
</li>
</ul>
<p class="paragraph">These are the most easy and straightforward methods you'll use, but they rely on internal implementation, which means <strong>you cannot decrypt a data that was encrypted by a different method or library</strong>. Unless they use the same internal implementation as this library.</p>
<h5 class=""> Advanced Usage/Methods</h5>
<ul>
<li>
<p class="paragraph"><code class="lang-kotlin">encryptBare</code></p>
</li>
<li>
<p class="paragraph"><code class="lang-kotlin">decryptBare</code></p>
</li>
</ul>
<p class="paragraph">The parameters requires all the necessary data for the encryption/decryption process individually such as IV, key, AADs, whatever that is applicable. Here <strong>you can decrypt data that was encrypted by a different method or library</strong>. Unless they involve a different or custom implementation of the encryption/decryption process.</p>
<h2 class=""> Compatibility</h2>
<p class="paragraph">I strive for backward-compatibility <strong>as much as possible</strong>, but due to the nature of this library being a cryptographic library, even a very small change can introduce a breaking change incompatible with previous versions.</p>
<p class="paragraph">The library will follow semantic versioning where breaking changes bumps the major version, this way developers know that something might not work should they update.</p>
<h2 class=""> Contributing</h2>
<p class="paragraph">If you want to contribute to this project, feel free to open an issue or discussion <strong>before</strong> opening a pull request to avoid wasted efforts.</p>
<h2 class=""> License</h2>
<p class="paragraph"><a href="https://app.fossa.com/projects/custom%2B26392%2Fgithub.com%2Fjhdcruz%2Fkipher?ref=badge_small"></a></p>
<p class="paragraph">This project is licensed under the <code class="lang-kotlin">Apache 2.0 License</code> - see the ./LICENSE.txt file for details</p>
<h2 class=""> Disclaimer</h2>
<p class="paragraph"><strong>I</strong> (<a href="https://github.com/jhdcruz">@jhdcruz</a>) <strong>am not a security expert/professional</strong>, this library is primarily made for convenience and ease-of-use, while providing as much security as possible out-of-the-box.</p>
<blockquote class="quotation">
<p class="paragraph">If you found a security issue, please see ./SECURITY.md.</p>
</blockquote>
</div>
<h2 class="">All modules:</h2>
<div class="table"><a data-name="-163584528%2FMain%2F0" anchor-label="kipher-aes" id="-163584528%2FMain%2F0" data-filterable-set=""></a>
<div class="table-row">
Expand Down
2 changes: 1 addition & 1 deletion docs/api/1.0.0-SNAPSHOT/kipher-aes/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<div class="breadcrumbs"></div>
<div class="cover ">
<h1 class="cover"><span><span>kipher-aes</span></span></h1>
<div class="platform-hinted UnderCoverText" data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":kipher-aes:dokkaHtmlPartial/main"><p class="paragraph">Library for encrypting/decrypting data using AES encryption algorithm.</p></div></div>
<div class="platform-hinted UnderCoverText" data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":kipher-aes:dokkaHtmlPartial/main"><p class="paragraph">Library for encrypting/decrypting data using AES encryption algorithm.</p><h3 class=""> What can you encrypt?</h3><p class="paragraph">You can use AES encryption on the ff. (but not limited to):</p><ul><li><p class="paragraph"><strong>Text</strong>: AES can encrypt plain text, such as messages, passwords, or any other textual data.</p></li><li><p class="paragraph"><strong>Files</strong>: AES can encrypt files of any type, including documents, images, videos, or any other file format.</p></li><li><p class="paragraph"><strong>Communication</strong>: AES can be used to encrypt data transmitted over a network, such as emails, instant messages, or data exchanged between client and server.</p></li></ul><blockquote class="quotation"><p class="paragraph">It's important to note that AES is a symmetric encryption algorithm, meaning the same key is used for both encryption and decryption. Therefore, the security of the encrypted data relies heavily on the protection and management of the encryption key.</p></blockquote></div></div>
</div>
<h2 class="">Packages</h2>
<div class="table"><a data-name="-1490546467%2FPackages%2F-1776319133" anchor-label="io.github.jhdcruz.kipher.aes" id="-1490546467%2FPackages%2F-1776319133" data-filterable-set=":kipher-aes:dokkaHtmlPartial/main"></a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<div class="cover ">
<h1 class="cover"><span><span>DEFAULT_KEY_SIZE</span></span></h1>
</div>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":kipher-aes:dokkaHtmlPartial/main"><div class="symbol monospace"><span class="token keyword">const </span><span class="token keyword">val </span><a href="-d-e-f-a-u-l-t_-k-e-y_-s-i-z-e.html">DEFAULT_KEY_SIZE</a><span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a><span class="token operator"> = </span><span class="token constant">256</span></div><p class="paragraph">Default key size value</p></div></div>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":kipher-aes:dokkaHtmlPartial/main"><div class="symbol monospace"><span class="token keyword">const </span><span class="token keyword">val </span><a href="-d-e-f-a-u-l-t_-k-e-y_-s-i-z-e.html">DEFAULT_KEY_SIZE</a><span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a><span class="token operator"> = </span><span class="token constant">256</span></div><p class="paragraph">Default key size value.</p></div></div>
</div>
<div class="footer">
<span class="go-to-top-icon"><a href="#content" id="go-to-top-link"></a></span><span>© 2023 Copyright</span><span class="pull-right"><span>Generated by </span><a href="https://github.com/Kotlin/dokka"><span>dokka</span><span class="padded-icon"></span></a></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ <h2 class="">Properties</h2>
</span></span></div>
<div>
<div class="title">
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":kipher-aes:dokkaHtmlPartial/main"><div class="symbol monospace"><span class="token keyword">const </span><span class="token keyword">val </span><a href="-d-e-f-a-u-l-t_-k-e-y_-s-i-z-e.html">DEFAULT_KEY_SIZE</a><span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a><span class="token operator"> = </span><span class="token constant">256</span></div><div class="brief "><p class="paragraph">Default key size value</p></div></div></div>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":kipher-aes:dokkaHtmlPartial/main"><div class="symbol monospace"><span class="token keyword">const </span><span class="token keyword">val </span><a href="-d-e-f-a-u-l-t_-k-e-y_-s-i-z-e.html">DEFAULT_KEY_SIZE</a><span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a><span class="token operator"> = </span><span class="token constant">256</span></div><div class="brief "><p class="paragraph">Default key size value.</p></div></div></div>
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit c4a9435

Please sign in to comment.