Skip to content

Instantly share code, notes, and snippets.

@pduprejazz
pduprejazz / RSA.cls
Created April 15, 2020 21:05 — forked from vasudevanselvaganesh/RSA.cls
RSA encryption / decryption in salesforce apex
public class RSA {
private Key key;
// Hex digits
private static final String DIGITS = '0123456789abcdef';
private static final Decimal HEX_BASE = 16;
public abstract class Key {
private String modulus;
public Key(String modulus) {
@pduprejazz
pduprejazz / RsaEncryption.cls
Created April 19, 2020 23:53 — forked from karmats/RsaEncryption.cls
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) {
@pduprejazz
pduprejazz / RSA.cls
Created April 19, 2020 23:54 — forked from nikitakarpenkov/RSA.cls
RSA encryption / decryption in salesforce apex
public class RSA {
private Key key;
// Hex digits
private static final String DIGITS = '0123456789abcdef';
private static final Decimal HEX_BASE = 16;
public abstract class Key {
private String modulus;
public Key(String modulus) {
@pduprejazz
pduprejazz / RSA.cls
Created April 19, 2020 23:54 — forked from nikitakarpenkov/RSA.cls
RSA encryption / decryption in salesforce apex
public class RSA {
private Key key;
// Hex digits
private static final String DIGITS = '0123456789abcdef';
private static final Decimal HEX_BASE = 16;
public abstract class Key {
private String modulus;
public Key(String modulus) {