Skip to content

Commit

Permalink
Merge pull request #4 from xendit/feat/implementation
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
jidi1f authored Sep 6, 2022
2 parents d928d52 + 8816842 commit 4916351
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,15 @@ import XenCrypt
try {
val xenKey = Base64.encode("BASE64_ENCODED_KEY_PROVIDED_BY_XENDIT".toByteArray())
val xenCrypt = XenCrypt(xenKey);
// sessionKey - randomly generated 32 length string, use xenCrypt.getSessionKey(), or implement own
val sessionData = xenCrypt.generateSessionId(sessionKey)
val decrypted = xenCrypt.decrypt(secret, iv, privateKey);
// plain - plain text to be encrypted (cvv2 ect..)
val encrypted = xenCrypt.encryption(plain, privateKey, iv)
} catch (error: Exception) {
throw error
Expand Down

0 comments on commit 4916351

Please sign in to comment.