dco_decode_crypto_error method
Implementation
@protected
CryptoError dco_decode_crypto_error(dynamic raw) {
// Codec=Dco (DartCObject based), see doc to use other codecs
switch (raw[0]) {
case 0:
return CryptoError_InvalidInput(
message: dco_decode_String(raw[1]),
);
case 1:
return CryptoError_EncryptionFailed(
message: dco_decode_String(raw[1]),
);
case 2:
return CryptoError_DecryptionFailed(
message: dco_decode_String(raw[1]),
);
case 3:
return CryptoError_KeyGenerationFailed(
message: dco_decode_String(raw[1]),
);
case 4:
return CryptoError_FileOperationFailed(
message: dco_decode_String(raw[1]),
);
case 5:
return CryptoError_HashFailed(
message: dco_decode_String(raw[1]),
);
case 6:
return CryptoError_RsaOperationFailed(
message: dco_decode_String(raw[1]),
);
case 7:
return CryptoError_SignatureVerificationFailed(
message: dco_decode_String(raw[1]),
);
case 8:
return CryptoError_UnsupportedAlgorithm(
algorithm: dco_decode_String(raw[1]),
);
default:
throw Exception("unreachable");
}
}