Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc doc changes #110

Merged
merged 1 commit into from
Apr 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@
**Closed issues:**

- Make json library configurable [\#44](https://github.com/danielberkompas/cloak/issues/44)
- Encryption Arguement Error [\#41](https://github.com/danielberkompas/cloak/issues/41)
- Encryption Argument Error [\#41](https://github.com/danielberkompas/cloak/issues/41)
- \*\* \(MatchError\) no match of right hand side value: false [\#40](https://github.com/danielberkompas/cloak/issues/40)
- Proposal / Forthcoming PRs: Multiple Ciphers With Keys [\#36](https://github.com/danielberkompas/cloak/issues/36)

Expand Down
2 changes: 1 addition & 1 deletion LICENSE → LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The MIT License (MIT)
# The MIT License (MIT)

Copyright (c) 2015 Daniel Berkompas

Expand Down
20 changes: 16 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@ Cloak
======

[![Hex Version](http://img.shields.io/hexpm/v/cloak.svg)](https://hex.pm/packages/cloak)
[![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/cloak/)
[![Total Download](https://img.shields.io/hexpm/dt/cloak.svg)](https://hex.pm/packages/cloak)
[![License](https://img.shields.io/hexpm/l/cloak.svg)](https://github.com/danielberkompas/cloak/blob/master/LICENSE.md)
[![Last Updated](https://img.shields.io/github/last-commit/danielberkompas/cloak.svg)](https://github.com/danielberkompas/cloak/commits/master)
[![Build Status](https://danielberkompas.semaphoreci.com/badges/cloak/branches/master.svg?style=shields)](https://danielberkompas.semaphoreci.com/projects/cloak)
[![Inline docs](http://inch-ci.org/github/danielberkompas/cloak.svg?branch=master)](http://inch-ci.org/github/danielberkompas/cloak)
[![Coverage Status](https://coveralls.io/repos/github/danielberkompas/cloak/badge.svg?branch=migrate)](https://coveralls.io/github/danielberkompas/cloak?branch=migrate)


Cloak is an Elixir encryption library that implements several best practices
and conveniences for Elixir developers:

Expand All @@ -25,8 +30,8 @@ and conveniences for Elixir developers:
```elixir
{:ok, ciphertext} = MyApp.Vault.encrypt("plaintext")
# => {:ok, <<1, 10, 65, 69, 83, 46, 71, 67, 77, 46, 86, 49, 45, 1, 250, 221,
# => 189, 64, 26, 214, 26, 147, 171, 101, 181, 158, 224, 117, 10, 254, 140, 207,
# => 215, 98, 208, 208, 174, 162, 33, 197, 179, 56, 236, 71, 81, 67, 85, 229,
# => 189, 64, 26, 214, 26, 147, 171, 101, 181, 158, 224, 117, 10, 254, 140, 207,
# => 215, 98, 208, 208, 174, 162, 33, 197, 179, 56, 236, 71, 81, 67, 85, 229,
# => ...>>}

MyApp.Vault.decrypt(ciphertext)
Expand All @@ -52,7 +57,7 @@ config :my_app, MyApp.Vault,
# In AES.GCM, it is important to specify 12-byte IV length for
# interoperability with other encryption software. See this GitHub issue
# for more details: https://github.com/danielberkompas/cloak/issues/93
#
#
# In Cloak 2.0, this will be the default iv length for AES.GCM.
aes_gcm: {Cloak.Ciphers.AES.GCM, tag: "AES.GCM.V1", key: <<...>>, iv_length: 12},
aes_ctr: {Cloak.Ciphers.AES.CTR, tag: "AES.CTR.V1", key: <<...>>}
Expand Down Expand Up @@ -94,4 +99,11 @@ You can use Cloak to transparently encrypt Ecto fields, using
## Security Notes

- Cloak is built on Erlang's `crypto` library, and therefore inherits its security.
- You can implement your own cipher modules to use with Cloak, which may use any other encryption algorithms of your choice.
- You can implement your own cipher modules to use with Cloak, which may use any other encryption algorithms of your choice.

## Copyright and License

Copyright (c) 2015 Daniel Berkompas

This work is free. You can redistribute it and/or modify it under the
terms of the MIT License. See the [LICENSE.md](./LICENSE.md) file for more details.
17 changes: 12 additions & 5 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
defmodule Cloak.Mixfile do
use Mix.Project

@source_url "https://github.com/danielberkompas/cloak"

def project do
[
app: :cloak,
Expand All @@ -15,8 +17,6 @@ defmodule Cloak.Mixfile do
"coveralls.post": :test,
"coveralls.html": :test
],
source_url: "https://github.com/danielberkompas/cloak",
description: "Elixir encryption library",
package: package(),
deps: deps(),
docs: docs(),
Expand All @@ -39,16 +39,21 @@ defmodule Cloak.Mixfile do

defp docs do
[
main: "readme",
extras: [
"README.md",
"CHANGELOG.md": [],
"LICENSE.md": [title: "License"],
"README.md": [title: "Overview"],
"guides/how_to/install.md": [title: "Install Cloak"],
"guides/how_to/generate_keys.md": [title: "Generate Encryption Keys"],
"guides/upgrading/0.9.x_to_1.0.x.md": [title: "0.9.x to 1.0.x"],
"guides/upgrading/0.8.x_to_0.9.x.md": [title: "0.8.x to 0.9.x"],
"guides/upgrading/0.7.x_to_0.8.x.md": [title: "0.7.x to 0.8.x"],
"guides/upgrading/0.6.x_to_0.7.x.md": [title: "0.6.x to 0.7.x"]
],
main: "readme",
source_url: @source_url,
source_ref: "v#{@version}",
formatters: ["html"],
extra_section: "GUIDES",
groups_for_extras: [
"How To": ~r/how_to/,
Expand All @@ -67,11 +72,13 @@ defmodule Cloak.Mixfile do

defp package do
[
description: "Elixir encryption library",
files: ["lib", "mix.exs", "README.md", "CHANGELOG.md", "LICENSE"],
maintainers: ["Daniel Berkompas"],
licenses: ["MIT"],
links: %{
"Github" => "https://github.com/danielberkompas/cloak"
"Changelog" => "https://hexdocs.pm/clock/changelog.html",
"GitHub" => @source_url
}
]
end
Expand Down