RSA Encryption
RSA Encryption is an algorithm encrypting public keys to protect information on the transmission line. Use a pair of key (public key
and private key
) to encrypt and decrypt the data. Partner uses public key provided by MoMo to encrypt the data in MoMo's format, MoMo uses private key
to decrypt.
You might want to take a look at the number of ways to create MoMo’s RSA.
Data before encrypt RSA
{
"partnerCode": "MOMOIQA420180417",
"partnerRefId": "Merchant123556666",
"partnerTransId": "8374736463",
"amount": 40000,
"description": "Thanh toan momo"
}
Data after encrypt RSA
A7WFmmnpn6TRX42Akh/iC5DdU5hhBT9LR5QSG6rJAl70hfEkkGUx2pTCai8s+M9KMVUcJ7m52iv74yhmeEjjN10TtEJoqITBIYBG2bqcTprhDijyhV4ePU7ytDNuLxzzIvGfTYyvbsEJ2jZTSf556yod12vhYqOJSFL/U2hVuxjUahf5Rnu5R/OLalg8QmlU6nQooEuNdzEXPMd6j9EaxOCiB2oM5/9QiTN0tCNSTIVvPtnlHu5mIbBHChcwfToIL4IAiD1nbrlDuBX//CZcrZj6hFqjvU31yb/DuG02c3aqWxbZKZ8csOwF9bL30m/yGr/0BQUWgunpDPrmCosf9A==