Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Tiny AES C
Commits
a0fd51ae
Commit
a0fd51ae
authored
Jul 08, 2017
by
kokke
Committed by
GitHub
Jul 08, 2017
Browse files
Update README.md
parent
a97324ad
Changes
1
Show whitespace changes
Inline
Side-by-side
README.md
View file @
a0fd51ae
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
This is a small and portable implementation of the AES ECB and CBC encryption algorithms written in C.
This is a small and portable implementation of the AES ECB and CBC encryption algorithms written in C.
You can override the default 128bit key with a 192 or 256bit by defining the symbols AES192 or AES256 in
`aes.h`
.
The API is very simple and looks like this (I am using C99
`<stdint.h>`
-style annotated types):
The API is very simple and looks like this (I am using C99
`<stdint.h>`
-style annotated types):
```
C
```
C
...
@@ -10,7 +12,7 @@ void AES_ECB_decrypt(uint8_t* input, const uint8_t* key, uint8_t* output);
...
@@ -10,7 +12,7 @@ void AES_ECB_decrypt(uint8_t* input, const uint8_t* key, uint8_t* output);
void AES_CBC_encrypt_buffer(uint8_t* output, uint8_t* input, uint32_t length, const uint8_t* key, const uint8_t* iv);
void AES_CBC_encrypt_buffer(uint8_t* output, uint8_t* input, uint32_t length, const uint8_t* key, const uint8_t* iv);
void AES_CBC_decrypt_buffer(uint8_t* output, uint8_t* input, uint32_t length, const uint8_t* key, const uint8_t* iv);
void AES_CBC_decrypt_buffer(uint8_t* output, uint8_t* input, uint32_t length, const uint8_t* key, const uint8_t* iv);
```
```
You can choose to use the standard 128b key or 192/256b by defining the symbols AES192 or AES256 in
`aes.h`
- AES128 is defined by default.
You can choose to use one or both of the modes-of-operation, by defining the symbols CBC and ECB. See the header file for clarification.
You can choose to use one or both of the modes-of-operation, by defining the symbols CBC and ECB. See the header file for clarification.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment