From f77010e873c54ed5c02a60887fd37f68e3d87827 Mon Sep 17 00:00:00 2001 From: Joni Eskelinen Date: Thu, 3 Aug 2017 12:26:29 +0300 Subject: [PATCH] Update README --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index bbda540..6f184e4 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ [![License](https://poser.pugx.org/sop/aes-kw/license)](https://github.com/sop/aes-kw/blob/master/LICENSE) # AES Key Wrap + A PHP library for AES Key Wrap ([RFC 3394](https://tools.ietf.org/html/rfc3394)) algorithm with padding @@ -13,15 +14,18 @@ support. Supports AES key sizes of 128, 192 and 256 bits. ## Installation + This library is available on [Packagist](https://packagist.org/packages/sop/aes-kw). composer require sop/aes-kw ## Code examples + Here are some simple usage examples. Namespaces are omitted for brevity. ### Wrap a 128 bit key with AES-128 + Wrap a key of 16 bytes using a 16-byte key encryption key. ```php @@ -37,6 +41,7 @@ Outputs: 89efdbc3501f1f5e952a4bbae1329c9f1a47b9fd61b48dee ### Unwrap a key + Unwrap a key from previous example. `$kek` and `$algo` variables are the same. `$ciphertext` variable contains the output from a wrapping procedure. @@ -50,6 +55,7 @@ Outputs: MySecretPassword ### Wrap an arbitrary length passphrase with AES-192 + Wrapping a key that is not a multiple of 64 bits requires padding. ```php @@ -65,6 +71,7 @@ Outputs: f319811450badfe4385b5534bf26fa6f9fdcd1a593b3ae6b707f15c1015bbf3faf58619818bd8784 ### Unwrap a key with padding + Key that was wrapped with padding must be unwrapped with `unwrapPad`. ```php @@ -77,4 +84,5 @@ Outputs: My hovercraft is full of eels. ## License + This project is licensed under the MIT License.