Appendix / AES Encryption

AES Encryption

Use HashKey and HasIV for AES encryption. Please UrlEncode the payload before AES encryption.

  • AES encryption strength setting mode: 128 bit.
  • CipherMode : CBC
  • PaddingMode :PKCS7

Example (encryption):

  • MerchantID=2000132
  • HashKey=5294y06JbISpM5x9
  • HashIV=v77hoKGq4kWxNNIS

(1) Data before encryption:

				
					{"Name":"Test","ID":"A123456789"}
				
			

(2) URL Encode

				
					%7B%22Name%22%3A%22Test%22%2C%22ID%22%3A%22A123456789%22%7D
				
			

(3) AES encryption:

				
					0FKSa0j4InjlU0ewoWpzd9FmU9LVR/8z9Zmh8d+shjJ8fuvlmNxsxyOQfC2BB4VVPEA/MyAHNjzV6HcAGYXgCw==
				
			

Example (decryption)

  • MerchantID=2000132
  • HashKey=5294y06JbISpM5x9
  • HashIV=v77hoKGq4kWxNNIS

(1) Data (AES encrypted):

				
					0FKSa0j4InjlU0ewoWpzd9FmU9LVR/8z9Zmh8d+shjJ8fuvlmNxsxyOQfC2BB4VVPEA/MyAHNjzV6HcAGYXgCw==
				
			

(2) After decryption:

				
					%7B%22Name%22%3A%22Test%22%2C%22ID%22%3A%22A123456789%22%7D
				
			

(3) URLDecode:

				
					{"Name":"Test","ID":"A123456789"}
				
			

Copyright © Green World FinTech Service Co., Ltd. All rights reserved.

Green World