Skip to content

Instantly share code, notes, and snippets.

View vasudevanselvaganesh's full-sized avatar

vasudevanselvaganesh

View GitHub Profile
@vasudevanselvaganesh
vasudevanselvaganesh / RsaEncryption.cls
Created June 28, 2019 00:59 — 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) {
@vasudevanselvaganesh
vasudevanselvaganesh / RSA.cls
Created June 28, 2019 01:02 — 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) {