omemo_dart/lib/src/errors.dart

16 lines
710 B
Dart
Raw Normal View History

2022-08-03 14:41:33 +00:00
/// Triggered during X3DH if the signature if the SPK does verify to the actual SPK.
2022-08-02 13:40:26 +00:00
class InvalidSignatureException implements Exception {
String errMsg() => 'The signature of the SPK does not match the provided signature';
}
2022-08-03 14:41:33 +00:00
/// Triggered by the Double Ratchet if the computet HMAC does not match the attached HMAC.
class InvalidMessageHMACException implements Exception {
String errMsg() => 'The computed HMAC does not match the provided HMAC';
}
2022-08-03 14:44:18 +00:00
/// Triggered by the Double Ratchet if skipping messages would cause skipping more than
/// MAXSKIP messages
class SkippingTooManyMessagesException implements Exception {
String errMsg() => 'Skipping messages would cause a skip bigger than MAXSKIP';
}