-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Nguyen Van Nguyen <[email protected]>
- Loading branch information
Showing
22 changed files
with
32 additions
and
37 deletions.
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
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
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
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 |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
library; | ||
|
||
import 'dart:typed_data'; | ||
|
||
import 'package:pointycastle/api.dart'; | ||
|
||
/// Buffered cipher. | ||
|
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 |
---|---|---|
|
@@ -7,8 +7,8 @@ library; | |
import 'dart:typed_data'; | ||
import 'package:pointycastle/api.dart'; | ||
|
||
import 'base_engine.dart'; | ||
import '../../common/extensions.dart'; | ||
import 'base_engine.dart'; | ||
|
||
/// Camellia - based on RFC 3713. | ||
/// Author Nguyen Van Nguyen <[email protected]> | ||
|
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
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 |
---|---|---|
|
@@ -7,8 +7,8 @@ library; | |
import 'dart:typed_data'; | ||
import 'package:pointycastle/api.dart'; | ||
|
||
import 'base_engine.dart'; | ||
import '../../common/extensions.dart'; | ||
import 'base_engine.dart'; | ||
|
||
/// A class that provides a basic International Data Encryption Algorithm (IDEA) engine. | ||
/// Author Nguyen Van Nguyen <[email protected]> | ||
|
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 |
---|---|---|
|
@@ -7,8 +7,8 @@ library; | |
import 'dart:typed_data'; | ||
import 'package:pointycastle/api.dart'; | ||
|
||
import 'base_engine.dart'; | ||
import '../../common/extensions.dart'; | ||
import 'base_engine.dart'; | ||
|
||
/// A class that provides Twofish encryption operations. | ||
/// Author Nguyen Van Nguyen <[email protected]> | ||
|
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 |
---|---|---|
|
@@ -6,14 +6,14 @@ library; | |
|
||
export 'aead_algorithm.dart'; | ||
export 'compression_algorithm.dart'; | ||
export 'hash_algorithm.dart'; | ||
export 'key_algorithm.dart'; | ||
export 'key_flag.dart'; | ||
export 'key_version.dart'; | ||
export 'literal_format.dart'; | ||
export 'signature_subpacket_type.dart'; | ||
export 'support_feature.dart'; | ||
export 'symmetric_algorithm.dart'; | ||
export 'hash_algorithm.dart'; | ||
export 'key_algorithm.dart'; | ||
export 'signature_subpacket_type.dart'; | ||
|
||
///Signature types enum | ||
/// Author Nguyen Van Nguyen <[email protected]> | ||
|
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
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 |
---|---|---|
|
@@ -7,13 +7,13 @@ library; | |
import '../common/armor.dart'; | ||
import '../common/helpers.dart'; | ||
import '../enum/armor_type.dart'; | ||
import '../message/base_message.dart'; | ||
import '../packet/base_packet.dart'; | ||
import '../type/encrypted_data_packet.dart'; | ||
import '../type/encrypted_message.dart'; | ||
import '../type/packet_list.dart'; | ||
import '../type/private_key.dart'; | ||
import '../type/session_key.dart'; | ||
import 'base_message.dart'; | ||
|
||
/// OpenPGP encrypted message class | ||
/// Author Nguyen Van Nguyen <[email protected]> | ||
|
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 |
---|---|---|
|
@@ -13,7 +13,6 @@ import '../enum/aead_algorithm.dart'; | |
import '../enum/armor_type.dart'; | ||
import '../enum/compression_algorithm.dart'; | ||
import '../enum/symmetric_algorithm.dart'; | ||
import '../message/base_message.dart'; | ||
import '../packet/base_packet.dart'; | ||
import '../packet/key/session_key.dart'; | ||
import '../type/key.dart'; | ||
|
@@ -22,6 +21,7 @@ import '../type/literal_message.dart'; | |
import '../type/packet_list.dart'; | ||
import '../type/session_key.dart'; | ||
import '../type/signature_packet.dart'; | ||
import 'base_message.dart'; | ||
|
||
/// OpenPGP literal message class | ||
/// Author Nguyen Van Nguyen <[email protected]> | ||
|
@@ -59,7 +59,7 @@ final class LiteralMessage extends BaseMessage | |
/// Taking the algorithm preferences of the passed encryption keys, if any. | ||
static SessionKeyInterface generateSessionKey( | ||
final Iterable<KeyInterface> encryptionKeys, [ | ||
final SymmetricAlgorithm defaultSymmetric = SymmetricAlgorithm.aes128, | ||
final SymmetricAlgorithm defaultSymmetric = SymmetricAlgorithm.aes256, | ||
]) { | ||
final SymmetricAlgorithm symmetric; | ||
if (encryptionKeys.isNotEmpty) { | ||
|
@@ -163,7 +163,7 @@ final class LiteralMessage extends BaseMessage | |
encrypt({ | ||
final Iterable<KeyInterface> encryptionKeys = const [], | ||
final Iterable<String> passwords = const [], | ||
final SymmetricAlgorithm symmetric = SymmetricAlgorithm.aes128, | ||
final SymmetricAlgorithm symmetric = SymmetricAlgorithm.aes256, | ||
}) { | ||
final sessionKey = generateSessionKey( | ||
encryptionKeys, | ||
|
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 |
---|---|---|
|
@@ -8,14 +8,14 @@ import '../common/armor.dart'; | |
import '../common/helpers.dart'; | ||
import '../enum/armor_type.dart'; | ||
import '../enum/hash_algorithm.dart'; | ||
import '../message/verification.dart'; | ||
import '../packet/base_packet.dart'; | ||
import '../type/cleartext_message.dart'; | ||
import '../type/key.dart'; | ||
import '../type/literal_data.dart'; | ||
import '../type/signature.dart'; | ||
import '../type/signature_packet.dart'; | ||
import '../type/verification.dart'; | ||
import 'verification.dart'; | ||
|
||
/// Signature class | ||
/// Author Nguyen Van Nguyen <[email protected]> | ||
|
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
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
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
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
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
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
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
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
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