# Unified API Param
# Content
parameter name | required | type | description |
---|---|---|---|
sign | Yes | string | RSA sign of param |
param | Yes | string | request param content string |
# Example
{
"sign": "abcdef",
"param": "{}"
}
# Descrption
- BluePay will construct the request parameters according to the specific interface documents, and format the request
parameters into JSON format as the value of
param
; - BluePay uses BluePay' RSA private key to sign
param
, and the obtained value is used as the value ofsign
; - When the merchant receives the request from BluePay, it uses the RSA public key of BluePay to verify and
sign
param
. If the signature is consistent withsign
, it proves that the request is requested by BluePay; - Please ask the BluePay administrator for the RSA public key of BluePay.
# Appendix RSA using case(in Java)
Generate RSA key pair:
import java.security.*;
import java.util.Base64;
public class RsaGenerateKeyPair {
public static void main(String[] args) throws NoSuchAlgorithmException {
KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA");
keyPairGenerator.initialize(4096);
KeyPair keyPair = keyPairGenerator.genKeyPair();
PublicKey publicKey = keyPair.getPublic();
byte[] publicKeyBytes = publicKey.getEncoded();
String publicKeyBase64 = Base64.getEncoder().encodeToString(publicKeyBytes);
System.out.println(publicKeyBase64);
PrivateKey privateKey = keyPair.getPrivate();
byte[] privateKeyBytes = privateKey.getEncoded();
String privateKeyBase64 = Base64.getEncoder().encodeToString(privateKeyBytes);
System.out.println(privateKeyBase64);
}
}
RSA key length should be 4096
RSA public key should be provided to BluePay, and do not disclose to any other.
RSA private key is kept by merchant, and do not disclose to any other.
When the merchant calls the BluePay Open API, it uses the RSA private key to sign the request param, and the BluePay server uses the RSA public key provided by the merchant to verify the signature. If the verification fails, it will refuse to process the request.
# key pair example
RSA public key:
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAnFPgpmzqcKVGp1Ci/WUPzPkhBnojDwPDBFWbB6RBXKjU8Pdp+n9K7rA0ZP6BD19O4MMJwYxG9n7zf7/IboA+bFfW/jsBGi41g7wBafbJxBKXQeXsdE8aRw7BcvjrTbL6EVUn2kMci2d9BMPMsPHCyDmubVIVVN+0rxft0vw2R5jbD/kg7e0K4+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f8ZPM8gxKVRh6R0Ne67h01FDzrg5+gYVx1H4hlg/dfFO6YwmS7zsZDzOy53oWYGZcHQH0b8lYKJr/PcSjoYJPtazWoeeAUfnXS8NXG+vsRqccSSQzCPrK33ECggEAbr3OYFNmo9D/Ud3zhTFT4wV2ZybfeVgDdI2drWUNTxdHf2FNYxNMYu3IFmyzqpvr7CSOXzLBGfvQxMa1qZZ4nM4Jd3Ai5HTW3kU9HLqVs8pbBdTNY5MNA+cDSGNZeUjcqjnu/5az6T92ZVigBkOjKIjB0hlrQR/ADZLwbABVK3ISNDbffAm4geyVhk3EkJBs+YIYhoWJ78E1/Y94WEPL5qPJkTG4PhAl+Krjwaq6paEwG8FEHZ5MuqwDXlG2EOMJ9j6s1UwJ0cpyWOtNBSWl+7YnQCJZCQiMmcDorCh/WEM+X7t1VxnxmDsOQ336gLPP/EYEaA8i78TMwvAVt1bN1g==
# RSA sign
import java.security.KeyFactory;
import java.security.Signature;
import java.security.spec.PKCS8EncodedKeySpec;
import java.util.Base64;
public class RsaSign {
public static final String PRIVATE_KEY = "MIIJQgIBADANBgkqhkiG9w0BAQEFAASCCSwwggkoAgEAAoICAQCcU+CmbOpwpUanUKL9ZQ/M+SEGeiMPA8MEVZsHpEFcqNTw92n6f0rusDRk/oEPX07gwwnBjEb2fvN/v8hugD5sV9b+OwEaLjWDvAFp9snEEpdB5ex0TxpHDsFy+OtNsvoRVSfaQxyLZ30Ew8yw8cLIOa5tUhVU37SvF+3S/DZHmNsP+SDt7Qrj6WznTl5jwpG/aukt0SWHJigD4+kUZn/zgWE7ScIZNBkLPh1wgr1rFnxFcqlVlBSi0F9srPNiYLwVBTgx5Cnm9O23IS53I7T/0+1lQQSDWw3bXthnLAd5LbvjTfUXx0MLtp8PaJVMRLWhsiiq/AScP0IN9JuYXSnAu+F4uF0bJWeHcWYy9B626t/5xNhmi0/uKBOgvUySZMiVInaranM81rPR3IGivEHbxaXEK49Fm5EI3OF3P8fr3jK3KYSnCpdSjlVtx975CBU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WL+xXZpJYxLX6FDxLdUi5vGLGNiBa064C1YJvJGX2c3E7/hFfdGIXwZXuYR03l49UUwO0W4U4IPcaNf8ZPM8gxKVRh6R0Ne67h01FDzrg5+gYVx1H4hlg/dfFO6YwmS7zsZDzOy53oWYGZcHQH0b8lYKJr/PcSjoYJPtazWoeeAUfnXS8NXG+vsRqccSSQzCPrK33ECggEAbr3OYFNmo9D/Ud3zhTFT4wV2ZybfeVgDdI2drWUNTxdHf2FNYxNMYu3IFmyzqpvr7CSOXzLBGfvQxMa1qZZ4nM4Jd3Ai5HTW3kU9HLqVs8pbBdTNY5MNA+cDSGNZeUjcqjnu/5az6T92ZVigBkOjKIjB0hlrQR/ADZLwbABVK3ISNDbffAm4geyVhk3EkJBs+YIYhoWJ78E1/Y94WEPL5qPJkTG4PhAl+Krjwaq6paEwG8FEHZ5MuqwDXlG2EOMJ9j6s1UwJ0cpyWOtNBSWl+7YnQCJZCQiMmcDorCh/WEM+X7t1VxnxmDsOQ336gLPP/EYEaA8i78TMwvAVt1bN1g==";
public static void main(String[] args) throws Exception {
String param = "{\"appId\":\"str1\",\"appName\":\"str2\",\"channelCode\":\"str3\",\"mchOrderId\":\"str4\",\"amunt\":200,\"notifyUrl\":\"str5\",\"customerName\":\"str6\",\"email\":\"str7\",\"mobile\":\"str8\",\"remark\":\"str\"}";
Signature signature = Signature.getInstance("SHA256withRSA");
signature.initSign(KeyFactory.getInstance("RSA").generatePrivate(new PKCS8EncodedKeySpec(Base64.getDecoder().decode(PRIVATE_KEY))));
signature.update(param.getBytes());
byte[] bytes = signature.sign();
String sign = Base64.getEncoder().encodeToString(bytes);
System.out.println(sign);
}
}
the value of
sign
should be:
TRFUJBoPDGaxXGCPp6BdMtRX4KjsfcPLQNkB95WCbO47LCU6NEohiNcIj1G7RG9OfbeYC3VrMXj7NnRrsvVnZQNUq1F5FIOb0C52qYjYimzY5MXpTBEgZ/Fxg75b9g5/tQAN48tQX3/gPTaJudeyT3POwsHx2jNBiJoV59nPEXFT56X3BzsXjLejEVlB2CuVBAOo8zQ0smq9eqrplWY+nTgwS3LY5tdrbHlMbxIj4Jfn+GTZBqrlC80GgFlaAR3iU8p4Jyjmb2HBjUUO6cs/F6JRwPrZdVjlmL+4dFd+GCL8QEAWs+7epVjIE5rIF7XoLSvenryW3IR0H3OPAtj3ETEekCkttC7sDynPDOkjhSE5uwc0HtYyUFVxXQJAYPNSNWXYxVQFSXzaVdEzgdqSaRzLuSrYzpT38ua/ZtzhvpWAyeWvUSONP6q4ZJEWcDsafDhy4/LLKjdOisiLgaBHiiaOYZQYqo6p7pPE9Rv8/MIZgm5qXqVEC5OI+tYeMssSMZIrnd1jDkjW+h1RpuuvD0pmYQjrhk9/+hH6empXLnCfSA5kzGw6shi8c/XbiKWOaqgSTLsHXxmjATDdSKjuQk4VJ4aNxcve1G8Tx7FqWxBCVESkJPRODMnp6S//dZmCO9+xNVPCwhFOArMH/AB+YwbFPsMVku2J12Kk96sy/mo=
# RSA verification
import java.security.KeyFactory;
import java.security.Signature;
import java.security.spec.X509EncodedKeySpec;
import java.util.Base64;
public class RsaVerifySign {
public static final String PUBLIC_KEY = "MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAnFPgpmzqcKVGp1Ci/WUPzPkhBnojDwPDBFWbB6RBXKjU8Pdp+n9K7rA0ZP6BD19O4MMJwYxG9n7zf7/IboA+bFfW/jsBGi41g7wBafbJxBKXQeXsdE8aRw7BcvjrTbL6EVUn2kMci2d9BMPMsPHCyDmubVIVVN+0rxft0vw2R5jbD/kg7e0K4+ls505eY8KRv2rpLdElhyYoA+PpFGZ/84FhO0nCGTQZCz4dcIK9axZ8RXKpVZQUotBfbKzzYmC8FQU4MeQp5vTttyEudyO0/9PtZUEEg1sN217YZywHeS274031F8dDC7afD2iVTES1obIoqvwEnD9CDfSbmF0pwLvheLhdGyVnh3FmMvQeturf+cTYZotP7igToL1MkmTIlSJ2q2pzPNaz0dyBorxB28WlxCuPRZuRCNzhdz/H694ytymEpwqXUo5Vbcfe+QgVFKduhnYapY4Ntv8oSdsH2MeKb5dhc1sO+I0fqrIW25zUOH8ECWQbgV50I7QIPOhKuLOkZW/EEG2epwlY83HqNrKhH6Wd+DXEjimz9zRmCNRboA8MswN8TRv6vGnmP8rFbPiIl/pBADFViiF+TP08O2VWb/9RaXils0MJfhMvTZ6PjhScIKtX9q6wT28gHYIdBD5UfrKLPndJMxM9u3HzWYCwhxa4boxu2+3KLwd7zFECAwEAAQ==";
public static void main(String[] args) throws Exception {
String param = "{\"appId\":\"str1\",\"appName\":\"str2\",\"channelCode\":\"str3\",\"mchOrderId\":\"str4\",\"amunt\":200,\"notifyUrl\":\"str5\",\"customerName\":\"str6\",\"email\":\"str7\",\"mobile\":\"str8\",\"remark\":\"str\"}";
String sign = "TRFUJBoPDGaxXGCPp6BdMtRX4KjsfcPLQNkB95WCbO47LCU6NEohiNcIj1G7RG9OfbeYC3VrMXj7NnRrsvVnZQNUq1F5FIOb0C52qYjYimzY5MXpTBEgZ/Fxg75b9g5/tQAN48tQX3/gPTaJudeyT3POwsHx2jNBiJoV59nPEXFT56X3BzsXjLejEVlB2CuVBAOo8zQ0smq9eqrplWY+nTgwS3LY5tdrbHlMbxIj4Jfn+GTZBqrlC80GgFlaAR3iU8p4Jyjmb2HBjUUO6cs/F6JRwPrZdVjlmL+4dFd+GCL8QEAWs+7epVjIE5rIF7XoLSvenryW3IR0H3OPAtj3ETEekCkttC7sDynPDOkjhSE5uwc0HtYyUFVxXQJAYPNSNWXYxVQFSXzaVdEzgdqSaRzLuSrYzpT38ua/ZtzhvpWAyeWvUSONP6q4ZJEWcDsafDhy4/LLKjdOisiLgaBHiiaOYZQYqo6p7pPE9Rv8/MIZgm5qXqVEC5OI+tYeMssSMZIrnd1jDkjW+h1RpuuvD0pmYQjrhk9/+hH6empXLnCfSA5kzGw6shi8c/XbiKWOaqgSTLsHXxmjATDdSKjuQk4VJ4aNxcve1G8Tx7FqWxBCVESkJPRODMnp6S//dZmCO9+xNVPCwhFOArMH/AB+YwbFPsMVku2J12Kk96sy/mo=";
Signature signature = Signature.getInstance("SHA256withRSA");
signature.initVerify(KeyFactory.getInstance("RSA").generatePublic(new X509EncodedKeySpec(Base64.getDecoder().decode(PUBLIC_KEY))));
signature.update(param.getBytes());
boolean result = signature.verify(Base64.getDecoder().decode(sign));
System.out.println(result);
}
}
the value of result should be
true