-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from awslabs/readme-updates
Readme updates.
- Loading branch information
Showing
2 changed files
with
97 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
sudo: true | ||
language: c | ||
|
||
os: osx | ||
osx_image: | ||
- xcode8 | ||
- xcode9.2 | ||
- xcode10.1 | ||
compiler: clang | ||
|
||
script: | ||
- ./codebuild/common-posix.sh -DCMAKE_EXPORT_COMPILE_COMMANDS=ON |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,88 @@ AWS Crypto Abstraction Layer: Cross-Platform, C99 wrapper for cryptography primi | |
|
||
## License | ||
|
||
This library is licensed under the Apache 2.0 License. | ||
This library is licensed under the Apache 2.0 License. | ||
|
||
## Supported Platforms | ||
* Windows (Vista and Later) | ||
* Apple | ||
* Unix (via OpenSSL compatible libcrypto) | ||
|
||
## Build Instructions | ||
Since this project builds with CMake, you can build with whichever tool you prefer. Here, we show make for simplicity. You can | ||
use Visual Studio, XCode, or whatever you'd like via the -G option. | ||
|
||
``` | ||
git clone [email protected]:awslabs/aws-c-common | ||
mkdir aws-c-common-build | ||
cd aws-c-common-build | ||
cmake -DCMAKE_PREFIX_PATH=<install path> -DCMAKE_INSTALL_PREFIX=<install path> ../aws-c-common | ||
make | ||
make test | ||
make install | ||
cd .. | ||
git clone [email protected]:awslabs/aws-c-cal | ||
mkdir aws-c-cal-build | ||
cd aws-c-cal-build | ||
cmake -DCMAKE_PREFIX_PATH=<install path> -DCMAKE_INSTALL_PREFIX=<install path> ../aws-c-cal | ||
make | ||
make test | ||
make install | ||
```` | ||
|
||
## Currently provided algorithms | ||
|
||
### Hashes | ||
#### MD5 | ||
##### Streaming | ||
```` | ||
struct aws_hash *hash = aws_md5_new(allocator); | ||
aws_hash_update(hash, &your_buffer); | ||
aws_hash_finalize(hash, &output_buffer, 0); | ||
aws_hash_destroy(hash); | ||
```` | ||
|
||
##### One-Shot | ||
```` | ||
aws_md5_compute(allocator, &your_buffer, &output_buffer, 0); | ||
```` | ||
|
||
#### SHA256 | ||
##### Streaming | ||
```` | ||
struct aws_hash *hash = aws_sha256_new(allocator); | ||
aws_hash_update(hash, &your_buffer); | ||
aws_hash_finalize(hash, &output_buffer, 0); | ||
aws_hash_destroy(hash); | ||
```` | ||
|
||
##### One-Shot | ||
```` | ||
aws_sha256_compute(allocator, &your_buffer, &output_buffer, 0); | ||
```` | ||
|
||
### HMAC | ||
#### SHA256 HMAC | ||
##### Streaming | ||
```` | ||
struct aws_hmac *hmac = aws_sha256_hmac_new(allocator, &secret_buf); | ||
aws_hmac_update(hmac, &your_buffer); | ||
aws_hmac_finalize(hmac, &output_buffer, 0); | ||
aws_hmac_destroy(hmac); | ||
```` | ||
|
||
##### One-Shot | ||
```` | ||
aws_sha256_hmac_compute(allocator, &secret_buf, &your_buffer, &output_buffer, 0); | ||
```` | ||
|
||
## FAQ | ||
### I want more algorithms, what do I do? | ||
Great! So do we! At a minimum, file an issue letting us know. If you want to file a Pull Request, we'd be happy to review and merge it when it's ready. | ||
### Who should consume this package directly? | ||
Are you writing C directly? Then you should. | ||
Are you using any other programming language? This functionality will be exposed via that language specific crt packages. | ||
### I found a security vulnerability in this package. What do I do? | ||
Do to the fact that this package is specifically performing cryptographic operations, please don't file a public issue. Instead, email [email protected], and we'll work with you directly. | ||
|