Skip to content

Commit

Permalink
Rename some functions
Browse files Browse the repository at this point in the history
- `chacha20poly1305digest` -> `chacha20poly1305Digest`
- `chacha20poly1305verify` -> `chacha20poly1305Verify`
- `salsa20poly1305digest` -> `salsa20poly1305Digest`
- `salsa20poly1305verify` -> `salsa20poly1305Verify`
  • Loading branch information
dipu-bd committed Apr 18, 2024
1 parent b7b1ba2 commit 824eda7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Implementations of cryptographic algorithms for encryption and decryption in Dar
| ----------------- | -------------------------------------------------------------------------------------------------------------------- | :----------: |
| XOR | `XOR`, `xor`, `xorStream` | Wikipedia |
| ChaCha20 | `ChaCha20`, `chacha20`, `chacha20Stream` | RFC-8439 |
| ChaCha20/Poly1305 | `ChaCha20Poly1305`, `chacha20poly1305digest`, `chacha20poly1305verify`, `chacha20poly1305`, `chacha20poly1305Stream` | RFC-8439 |
| Salsa20 | `Salsa20`, `salsa20`, `salsa20Stream` | Snuffle 2005 |
| Salsa20/Poly1305 | `Salsa20Poly1305`, `salsa20poly1305digest`, `salsa20poly1305verify`, `salsa20poly1305`, `salsa20poly1305Stream` | Snuffle 2005 |
| ChaCha20/Poly1305 | `ChaCha20Poly1305`, `chacha20poly1305Digest`, `chacha20poly1305Verify`, `chacha20poly1305`, `chacha20poly1305Stream` | RFC-8439 |
| Salsa20 | `Salsa20`, `salsa20`, `salsa20Stream` | Snuffle-2005 |
| Salsa20/Poly1305 | `Salsa20Poly1305`, `salsa20poly1305Digest`, `salsa20poly1305Verify`, `salsa20poly1305`, `salsa20poly1305Stream` | Snuffle-2005 |

## Getting started

Expand Down
2 changes: 1 addition & 1 deletion benchmark/chacha20_poly1305.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class CipherlibDigestBenchmark extends Benchmark {

@override
void run() {
cipher.chacha20poly1305digest(input, key, nonce: nonce);
cipher.chacha20poly1305Digest(input, key, nonce: nonce);
}
}

Expand Down
2 changes: 1 addition & 1 deletion benchmark/salsa20_poly1305.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class CipherlibDigestBenchmark extends Benchmark {

@override
void run() {
cipher.salsa20poly1305digest(input, key, nonce: nonce);
cipher.salsa20poly1305Digest(input, key, nonce: nonce);
}
}

Expand Down
4 changes: 2 additions & 2 deletions lib/src/chacha20_poly1305.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export 'algorithms/chacha20_poly1305.dart' show ChaCha20Poly1305;
/// - [key] : A 32-bytes long key.
/// - [nonce] : A 12-bytes long nonce. Deafult: 0
/// - [aad] : Additional authenticated data.
HashDigest chacha20poly1305digest(
HashDigest chacha20poly1305Digest(
List<int> message,
List<int> key, {
List<int>? nonce,
Expand All @@ -33,7 +33,7 @@ HashDigest chacha20poly1305digest(
/// - [key] : A 32-bytes long key.
/// - [nonce] : A 12-bytes long nonce. Deafult: 0
/// - [aad] : Additional authenticated data.
bool chacha20poly1305verify(
bool chacha20poly1305Verify(
List<int> message,
List<int> key,
List<int> mac, {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/salsa20_poly1305.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export 'algorithms/salsa20_poly1305.dart' show Salsa20Poly1305;
/// - [key] : A 16 or 32-bytes long key.
/// - [nonce] : A 16-bytes long nonce. Deafult: 0
/// - [aad] : Additional authenticated data.
HashDigest salsa20poly1305digest(
HashDigest salsa20poly1305Digest(
List<int> message,
List<int> key, {
List<int>? nonce,
Expand All @@ -33,7 +33,7 @@ HashDigest salsa20poly1305digest(
/// - [key] : A 16 or 32-bytes long key.
/// - [nonce] : A 16-bytes long nonce. Deafult: 0
/// - [aad] : Additional authenticated data.
bool salsa20poly1305verify(
bool salsa20poly1305Verify(
List<int> message,
List<int> key,
List<int> mac, {
Expand Down

0 comments on commit 824eda7

Please sign in to comment.