EncryptionException.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /*
  3. * This file is part of the overtrue/wechat.
  4. *
  5. * (c) overtrue <i@overtrue.me>
  6. *
  7. * This source file is subject to the MIT license that is bundled
  8. * with this source code in the file LICENSE.
  9. */
  10. /**
  11. * EncryptionException.php.
  12. *
  13. * @author overtrue <i@overtrue.me>
  14. * @copyright 2015 overtrue <i@overtrue.me>
  15. *
  16. * @see https://github.com/overtrue
  17. * @see http://overtrue.me
  18. */
  19. namespace EasyWeChat\Encryption;
  20. use EasyWeChat\Core\Exception as CoreException;
  21. /**
  22. * Class EncryptionException.
  23. */
  24. class EncryptionException extends CoreException
  25. {
  26. const ERROR_INVALID_SIGNATURE = -40001; // Signature verification failed
  27. const ERROR_PARSE_XML = -40002; // Parse XML failed
  28. const ERROR_CALC_SIGNATURE = -40003; // Calculating the signature failed
  29. const ERROR_INVALID_AESKEY = -40004; // Invalid AESKey
  30. const ERROR_INVALID_APPID = -40005; // Check AppID failed
  31. const ERROR_ENCRYPT_AES = -40006; // AES Encryption failed
  32. const ERROR_DECRYPT_AES = -40007; // AES decryption failed
  33. const ERROR_INVALID_XML = -40008; // Invalid XML
  34. const ERROR_BASE64_ENCODE = -40009; // Base64 encoding failed
  35. const ERROR_BASE64_DECODE = -40010; // Base64 decoding failed
  36. const ERROR_XML_BUILD = -40011; // XML build failed
  37. const ILLEGAL_BUFFER = -41003; // Illegal buffer
  38. }