Skip to content

Instantly share code, notes, and snippets.

@karmats
karmats / RsaEncryption.cls
Last active August 9, 2023 08:18
RSA encryption with public key in salesforce apex
public with sharing class RsaEncryption {
private String modulus;
private String exponent;
// Hex digits
private static final String DIGITS = '0123456789abcdef';
private static final Decimal HEX_BASE = 16;
public RsaEncryption(String modulus, String exponent) {