-
Notifications
You must be signed in to change notification settings - Fork 3
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
120 changed files
with
251 additions
and
130 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Copyright 2022-present by Nguyen Van Nguyen <[email protected]>. All rights reserved. | ||
// Copyright 2022-present by Dart Privacy Guard project. All rights reserved. | ||
// For the full copyright and license information, please view the LICENSE | ||
// file that was distributed with this source code. | ||
|
||
|
@@ -9,6 +9,8 @@ import '../crypto/math/int_ext.dart'; | |
import '../enum/armor_type.dart'; | ||
import '../helpers.dart'; | ||
|
||
/// ASCII Armor class | ||
/// Author Nguyen Van Nguyen <[email protected]> | ||
class Armor { | ||
static const version = 'Dart PG v1.0.0'; | ||
static const comment = 'Dart Privacy Guard'; | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Copyright 2022-present by Nguyen Van Nguyen <[email protected]>. All rights reserved. | ||
// Copyright 2022-present by Dart Privacy Guard project. All rights reserved. | ||
// For the full copyright and license information, please view the LICENSE | ||
// file that was distributed with this source code. | ||
|
||
|
@@ -12,6 +12,7 @@ import '../math/byte_ext.dart'; | |
|
||
/// Asymmetric block cipher using basic ElGamal algorithm. | ||
/// Ported and modified from Bouncy Castle project | ||
/// Author Nguyen Van Nguyen <[email protected]> | ||
class ElGamalEngine implements AsymmetricBlockCipher { | ||
late ElGamalAsymmetricKey? _key; | ||
|
||
|
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
// Copyright 2022-present by Nguyen Van Nguyen <[email protected]>. All rights reserved. | ||
// Copyright 2022-present by Dart Privacy Guard project. All rights reserved. | ||
// For the full copyright and license information, please view the LICENSE | ||
// file that was distributed with this source code. | ||
|
||
import 'dart:typed_data'; | ||
|
||
/// Author Nguyen Van Nguyen <[email protected]> | ||
extension BigIntExt on BigInt { | ||
int get byteLength => (bitLength + 7) >> 3; | ||
|
||
|
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
// Copyright 2022-present by Nguyen Van Nguyen <[email protected]>. All rights reserved. | ||
// Copyright 2022-present by Dart Privacy Guard project. All rights reserved. | ||
// For the full copyright and license information, please view the LICENSE | ||
// file that was distributed with this source code. | ||
|
||
import 'dart:typed_data'; | ||
|
||
/// Author Nguyen Van Nguyen <[email protected]> | ||
extension Uint8ListExt on Uint8List { | ||
int toIn16([ | ||
Endian endian = Endian.big, | ||
|
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 |
---|---|---|
@@ -1,11 +1,12 @@ | ||
// Copyright 2022-present by Nguyen Van Nguyen <[email protected]>. All rights reserved. | ||
// Copyright 2022-present by Dart Privacy Guard project. All rights reserved. | ||
// For the full copyright and license information, please view the LICENSE | ||
// file that was distributed with this source code. | ||
|
||
import 'dart:typed_data'; | ||
|
||
import 'package:fixnum/fixnum.dart'; | ||
|
||
/// Author Nguyen Van Nguyen <[email protected]> | ||
extension IntExt on int { | ||
Uint8List pack16([Endian endian = Endian.big]) => Uint8List(2) | ||
..buffer.asByteData().setInt16( | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Copyright 2022-present by Nguyen Van Nguyen <[email protected]>. All rights reserved. | ||
// Copyright 2022-present by Dart Privacy Guard project. All rights reserved. | ||
// For the full copyright and license information, please view the LICENSE | ||
// file that was distributed with this source code. | ||
|
||
|
@@ -14,6 +14,7 @@ import '../math/int_ext.dart'; | |
|
||
/// Implementation of DSA (digital signature algorithm) | ||
/// Ported and modified from Bouncy Castle project | ||
/// Author Nguyen Van Nguyen <[email protected]> | ||
class DSASigner implements Signer { | ||
final Digest? _digest; | ||
|
||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/// Copyright 2022-present by Nguyen Van Nguyen <[email protected]>. All rights reserved. | ||
/// Copyright 2022-present by Dart Privacy Guard project. All rights reserved. | ||
/// For the full copyright and license information, please view the LICENSE | ||
/// file that was distributed with this source code. | ||
|
@@ -15,6 +15,7 @@ export 'twofish.dart'; | |
|
||
/// Base implementation of [BlockCipher] which provides shared methods. | ||
/// Ported from Bouncy Castle project | ||
/// Author Nguyen Van Nguyen <[email protected]> | ||
abstract class BaseCipher implements BlockCipher { | ||
@override | ||
Uint8List process(final Uint8List data) { | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Copyright 2022-present by Nguyen Van Nguyen <[email protected]>. All rights reserved. | ||
// Copyright 2022-present by Dart Privacy Guard project. All rights reserved. | ||
// For the full copyright and license information, please view the LICENSE | ||
// file that was distributed with this source code. | ||
|
||
|
@@ -14,6 +14,7 @@ import 'base_cipher.dart'; | |
/// All the algorithms herein are from Applied Cryptography | ||
/// and implement a simplified cryptography interface. | ||
/// Ported from Bouncy Castle project | ||
/// Author Nguyen Van Nguyen <[email protected]> | ||
class BlowfishEngine extends BaseCipher { | ||
static const _kp = [ | ||
0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, // 0 - 3 | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Copyright 2022-present by Nguyen Van Nguyen <[email protected]>. All rights reserved. | ||
// Copyright 2022-present by Dart Privacy Guard project. All rights reserved. | ||
// For the full copyright and license information, please view the LICENSE | ||
// file that was distributed with this source code. | ||
|
||
|
@@ -7,6 +7,7 @@ import 'dart:typed_data'; | |
import 'package:pointycastle/api.dart'; | ||
|
||
/// Ported from Bouncy Castle project | ||
/// Author Nguyen Van Nguyen <[email protected]> | ||
class BufferedCipher { | ||
final BlockCipher _underlyingCipher; | ||
|
||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Copyright 2022-present by Nguyen Van Nguyen <[email protected]>. All rights reserved. | ||
// Copyright 2022-present by Dart Privacy Guard project. All rights reserved. | ||
// For the full copyright and license information, please view the LICENSE | ||
// file that was distributed with this source code. | ||
|
||
|
@@ -12,6 +12,7 @@ import 'base_cipher.dart'; | |
|
||
/// Camellia - based on RFC 3713. | ||
/// Ported from Bouncy Castle project | ||
/// Author Nguyen Van Nguyen <[email protected]> | ||
class CamelliaEngine extends BaseCipher { | ||
static const _blockSize = 16; | ||
|
||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Copyright 2022-present by Nguyen Van Nguyen <[email protected]>. All rights reserved. | ||
// Copyright 2022-present by Dart Privacy Guard project. All rights reserved. | ||
// For the full copyright and license information, please view the LICENSE | ||
// file that was distributed with this source code. | ||
|
||
|
@@ -12,6 +12,7 @@ import 'base_cipher.dart'; | |
|
||
/// Camellia - based on RFC 3713 | ||
/// Ported from Bouncy Castle project | ||
/// Author Nguyen Van Nguyen <[email protected]> | ||
class CamelliaLightEngine extends BaseCipher { | ||
static const _blockSize = 16; | ||
|
||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Copyright 2022-present by Nguyen Van Nguyen <[email protected]>. All rights reserved. | ||
// Copyright 2022-present by Dart Privacy Guard project. All rights reserved. | ||
// For the full copyright and license information, please view the LICENSE | ||
// file that was distributed with this source code. | ||
|
||
|
@@ -17,6 +17,7 @@ import 'base_cipher.dart'; | |
/// | ||
/// and implement a simplified cryptography interface. | ||
/// Ported from Bouncy Castle project | ||
/// Author Nguyen Van Nguyen <[email protected]> | ||
class CAST5Engine extends BaseCipher { | ||
static const _sBox1 = [ | ||
0x30fb40d4, 0x9fa0ff0b, 0x6beccd2f, 0x3f258c7a, 0x1e213f2f, 0x9c004dd3, | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Copyright 2022-present by Nguyen Van Nguyen <[email protected]>. All rights reserved. | ||
// Copyright 2022-present by Dart Privacy Guard project. All rights reserved. | ||
// For the full copyright and license information, please view the LICENSE | ||
// file that was distributed with this source code. | ||
|
||
|
@@ -12,6 +12,7 @@ import 'base_cipher.dart'; | |
|
||
/// A class that provides a basic International Data Encryption Algorithm (IDEA) engine. | ||
/// Ported from Bouncy Castle project | ||
/// Author Nguyen Van Nguyen <[email protected]> | ||
class IDEAEngine extends BaseCipher { | ||
static const _mask = 0xffff; | ||
static const _base = 0x10001; | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Copyright 2022-present by Nguyen Van Nguyen <[email protected]>. All rights reserved. | ||
// Copyright 2022-present by Dart Privacy Guard project. All rights reserved. | ||
// For the full copyright and license information, please view the LICENSE | ||
// file that was distributed with this source code. | ||
|
||
|
@@ -12,6 +12,7 @@ import 'base_cipher.dart'; | |
|
||
/// A class that provides Twofish encryption operations. | ||
/// Ported from Bouncy Castle project | ||
/// Author Nguyen Van Nguyen <[email protected]> | ||
class TwofishEngine extends BaseCipher { | ||
/// Q-Table 0 | ||
static const _q0 = [ | ||
|
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 |
---|---|---|
@@ -1,8 +1,9 @@ | ||
// Copyright 2022-present by Nguyen Van Nguyen <[email protected]>. All rights reserved. | ||
// Copyright 2022-present by Dart Privacy Guard project. All rights reserved. | ||
// For the full copyright and license information, please view the LICENSE | ||
// file that was distributed with this source code. | ||
|
||
/// Armor type | ||
/// Author Nguyen Van Nguyen <[email protected]> | ||
enum ArmorType { | ||
multipartSection, | ||
multipartLast, | ||
|
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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
// Copyright 2022-present by Nguyen Van Nguyen <[email protected]>. All rights reserved. | ||
// Copyright 2022-present by Dart Privacy Guard project. All rights reserved. | ||
// For the full copyright and license information, please view the LICENSE | ||
// file that was distributed with this source code. | ||
|
||
/// Compression algorithm enum | ||
/// Author Nguyen Van Nguyen <[email protected]> | ||
enum CompressionAlgorithm { | ||
uncompressed(0), | ||
zip(1), | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Copyright 2022-present by Nguyen Van Nguyen <[email protected]>. All rights reserved. | ||
// Copyright 2022-present by Dart Privacy Guard project. All rights reserved. | ||
// For the full copyright and license information, please view the LICENSE | ||
// file that was distributed with this source code. | ||
|
||
|
@@ -7,6 +7,8 @@ import 'package:pointycastle/asn1.dart'; | |
import 'hash_algorithm.dart'; | ||
import 'symmetric_algorithm.dart'; | ||
|
||
/// Curve information enum | ||
/// Author Nguyen Van Nguyen <[email protected]> | ||
enum CurveInfo { | ||
prime256v1([1, 2, 840, 10045, 3, 1, 7], '1.2.840.10045.3.1.7'), | ||
secp256k1([1, 3, 132, 0, 10], '1.3.132.0.10'), | ||
|
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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
// Copyright 2022-present by Nguyen Van Nguyen <[email protected]>. All rights reserved. | ||
// Copyright 2022-present by Dart Privacy Guard project. All rights reserved. | ||
// For the full copyright and license information, please view the LICENSE | ||
// file that was distributed with this source code. | ||
|
||
/// Author Nguyen Van Nguyen <[email protected]> | ||
enum DHKeySize { | ||
l1024n160(1024, 160), | ||
l2048n224(2048, 224), | ||
|
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
// Copyright 2022-present by Nguyen Van Nguyen <[email protected]>. All rights reserved. | ||
// Copyright 2022-present by Dart Privacy Guard project. All rights reserved. | ||
// For the full copyright and license information, please view the LICENSE | ||
// file that was distributed with this source code. | ||
|
||
/// Hash Algorithms | ||
/// See https://www.rfc-editor.org/rfc/rfc4880#section-9.4 | ||
/// Author Nguyen Van Nguyen <[email protected]> | ||
enum HashAlgorithm { | ||
md5(1), | ||
sha1(2), | ||
|
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
// Copyright 2022-present by Nguyen Van Nguyen <[email protected]>. All rights reserved. | ||
// Copyright 2022-present by Dart Privacy Guard project. All rights reserved. | ||
// For the full copyright and license information, please view the LICENSE | ||
// file that was distributed with this source code. | ||
|
||
/// Public-Key Algorithms | ||
/// See https://tools.ietf.org/html/draft-ietf-openpgp-rfc4880bis-04#section-9.1 | ||
/// Author Nguyen Van Nguyen <[email protected]> | ||
enum KeyAlgorithm { | ||
/// RSA (Encrypt or Sign) [HAC] | ||
rsaEncryptSign(1), | ||
|
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 |
---|---|---|
@@ -1,8 +1,9 @@ | ||
// Copyright 2022-present by Nguyen Van Nguyen <[email protected]>. All rights reserved. | ||
// Copyright 2022-present by Dart Privacy Guard project. All rights reserved. | ||
// For the full copyright and license information, please view the LICENSE | ||
// file that was distributed with this source code. | ||
|
||
/// Key flag | ||
/// Author Nguyen Van Nguyen <[email protected]> | ||
enum KeyFlag { | ||
/// 0x01 - This key may be used to certify other keys. | ||
certifyKeys(1), | ||
|
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
// Copyright 2022-present by Nguyen Van Nguyen <[email protected]>. All rights reserved. | ||
// Copyright 2022-present by Dart Privacy Guard project. All rights reserved. | ||
// For the full copyright and license information, please view the LICENSE | ||
// file that was distributed with this source code. | ||
|
||
/// Author Nguyen Van Nguyen <[email protected]> | ||
enum KeyGenerationType { rsa, dsa, ecdsa, eddsa } |
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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
// Copyright 2022-present by Nguyen Van Nguyen <[email protected]>. All rights reserved. | ||
// Copyright 2022-present by Dart Privacy Guard project. All rights reserved. | ||
// For the full copyright and license information, please view the LICENSE | ||
// file that was distributed with this source code. | ||
|
||
/// Author Nguyen Van Nguyen <[email protected]> | ||
enum LiteralFormat { | ||
/// Binary data 'b' | ||
binary(98), | ||
|
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 |
---|---|---|
@@ -1,8 +1,9 @@ | ||
// Copyright 2022-present by Nguyen Van Nguyen <[email protected]>. All rights reserved. | ||
// Copyright 2022-present by Dart Privacy Guard project. All rights reserved. | ||
// For the full copyright and license information, please view the LICENSE | ||
// file that was distributed with this source code. | ||
|
||
/// A list of packet types and numeric tags associated with them. | ||
/// Author Nguyen Van Nguyen <[email protected]> | ||
enum PacketTag { | ||
publicKeyEncryptedSessionKey(1), | ||
signature(2), | ||
|
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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
// Copyright 2022-present by Nguyen Van Nguyen <[email protected]>. All rights reserved. | ||
// Copyright 2022-present by Dart Privacy Guard project. All rights reserved. | ||
// For the full copyright and license information, please view the LICENSE | ||
// file that was distributed with this source code. | ||
|
||
/// Author Nguyen Van Nguyen <[email protected]> | ||
enum RevocationKeyTag { | ||
classDefault(128), | ||
classSensitive(64); | ||
|
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
// Copyright 2022-present by Nguyen Van Nguyen <[email protected]>. All rights reserved. | ||
// Copyright 2022-present by Dart Privacy Guard project. All rights reserved. | ||
// For the full copyright and license information, please view the LICENSE | ||
// file that was distributed with this source code. | ||
|
||
/// Reason for Revocation | ||
/// See https://tools.ietf.org/html/rfc4880#section-5.2.3.23 | ||
/// Author Nguyen Van Nguyen <[email protected]> | ||
enum RevocationReasonTag { | ||
/// No reason specified (key revocations or cert revocations) | ||
noReason(0), | ||
|
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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
// Copyright 2022-present by Nguyen Van Nguyen <[email protected]>. All rights reserved. | ||
// Copyright 2022-present by Dart Privacy Guard project. All rights reserved. | ||
// For the full copyright and license information, please view the LICENSE | ||
// file that was distributed with this source code. | ||
|
||
/// Author Nguyen Van Nguyen <[email protected]> | ||
enum RSAKeySize { | ||
s2048(2048), | ||
s2560(2560), | ||
|
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 |
---|---|---|
@@ -1,8 +1,9 @@ | ||
// Copyright 2022-present by Nguyen Van Nguyen <[email protected]>. All rights reserved. | ||
// Copyright 2022-present by Dart Privacy Guard project. All rights reserved. | ||
// For the full copyright and license information, please view the LICENSE | ||
// file that was distributed with this source code. | ||
|
||
/// A string to key specifier type | ||
/// Author Nguyen Van Nguyen <[email protected]> | ||
enum S2kType { | ||
simple(0), | ||
salted(1), | ||
|
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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
// Copyright 2022-present by Nguyen Van Nguyen <[email protected]>. All rights reserved. | ||
// Copyright 2022-present by Dart Privacy Guard project. All rights reserved. | ||
// For the full copyright and license information, please view the LICENSE | ||
// file that was distributed with this source code. | ||
|
||
/// Author Nguyen Van Nguyen <[email protected]> | ||
enum S2kUsage { | ||
none(0), | ||
checksum(255), | ||
|
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 |
---|---|---|
@@ -1,8 +1,9 @@ | ||
// Copyright 2022-present by Nguyen Van Nguyen <[email protected]>. All rights reserved. | ||
// Copyright 2022-present by Dart Privacy Guard project. All rights reserved. | ||
// For the full copyright and license information, please view the LICENSE | ||
// file that was distributed with this source code. | ||
|
||
/// Signature subpacket type | ||
/// Author Nguyen Van Nguyen <[email protected]> | ||
enum SignatureSubpacketType { | ||
signatureCreationTime(2), | ||
signatureExpirationTime(3), | ||
|
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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
// Copyright 2022-present by Nguyen Van Nguyen <[email protected]>. All rights reserved. | ||
// Copyright 2022-present by Dart Privacy Guard project. All rights reserved. | ||
// For the full copyright and license information, please view the LICENSE | ||
// file that was distributed with this source code. | ||
|
||
/// Author Nguyen Van Nguyen <[email protected]> | ||
enum SignatureType { | ||
/// Signature of a binary document. | ||
binary(0), | ||
|
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
// Copyright 2022-present by Nguyen Van Nguyen <[email protected]>. All rights reserved. | ||
// Copyright 2022-present by Dart Privacy Guard project. All rights reserved. | ||
// For the full copyright and license information, please view the LICENSE | ||
// file that was distributed with this source code. | ||
|
||
/// Support Feature | ||
/// See https://tools.ietf.org/html/draft-ietf-openpgp-rfc4880bis-04#section-5.2.3.25 | ||
/// Author Nguyen Van Nguyen <[email protected]> | ||
enum SupportFeature { | ||
/// 0x01 - Modification Detection (packets 18 and 19) | ||
modificationDetection(1), | ||
|
Oops, something went wrong.