Skip to content

Commit

Permalink
Bindings/C: update with new error code
Browse files Browse the repository at this point in the history
  • Loading branch information
commial committed Jul 25, 2024
1 parent 359f53f commit dc0c339
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions bindings/C/mla.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ enum MLAStatus {
MLA_STATUS_CONFIG_ERROR_ECIES_COMPUTATION_ERROR = 1310726,
MLA_STATUS_CONFIG_ERROR_KEY_COMMITMENT_COMPUTATION_ERROR = 1310727,
MLA_STATUS_CONFIG_ERROR_KEY_COMMITMENT_CHECKING_ERROR = 1310728,
MLA_STATUS_CONFIG_ERROR_NO_RECIPIENTS = 1310729,
MLA_STATUS_DUPLICATE_FILENAME = 1376256,
MLA_STATUS_AUTHENTICATED_DECRYPTION_WRONG_TAG = 1441792,
MLA_STATUS_HKDF_INVALID_KEY_LENGTH = 1507328,
Expand Down
1 change: 1 addition & 0 deletions bindings/C/mla.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ enum class MLAStatus : uint64_t {
MLA_STATUS_CONFIG_ERROR_ECIES_COMPUTATION_ERROR = 1310726,
MLA_STATUS_CONFIG_ERROR_KEY_COMMITMENT_COMPUTATION_ERROR = 1310727,
MLA_STATUS_CONFIG_ERROR_KEY_COMMITMENT_CHECKING_ERROR = 1310728,
MLA_STATUS_CONFIG_ERROR_NO_RECIPIENTS = 1310729,
MLA_STATUS_DUPLICATE_FILENAME = 1376256,
MLA_STATUS_AUTHENTICATED_DECRYPTION_WRONG_TAG = 1441792,
MLA_STATUS_HKDF_INVALID_KEY_LENGTH = 1507328,
Expand Down
4 changes: 4 additions & 0 deletions bindings/C/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ pub enum MLAStatus {
ConfigErrorECIESComputationError = 0x140006,
ConfigErrorKeyCommitmentComputationError = 0x140007,
ConfigErrorKeyCommitmentCheckingError = 0x140008,
ConfigErrorNoRecipients = 0x140009,
DuplicateFilename = 0x150000,
AuthenticatedDecryptionWrongTag = 0x160000,
HKDFInvalidKeyLength = 0x170000,
Expand Down Expand Up @@ -162,6 +163,9 @@ impl From<MLAError> for MLAStatus {
MLAError::ConfigError(ConfigError::CompressionLevelOutOfRange) => {
MLAStatus::ConfigErrorCompressionLevelOutOfRange
}
MLAError::ConfigError(ConfigError::NoRecipients) => {
MLAStatus::ConfigErrorNoRecipients
}
MLAError::ConfigError(ConfigError::EncryptionKeyIsMissing) => {
MLAStatus::ConfigErrorEncryptionKeyIsMissing
}
Expand Down

0 comments on commit dc0c339

Please sign in to comment.