anchor.diff:  
     TRSA = class
     private
  +    class var FOpenSSLHandle: HMODULE;
  +    class var _PEM_read_bio_RSA_PUBKEY: function(bp : PBIO; x : PPRSA; cb : ppem_password_cb; u: Pointer) : PRSA cdecl;
  +    class var _EVP_MD_CTX_create: function: PEVP_MD_CTX cdecl;
  +    class var _EVP_MD_CTX_destroy: procedure(ctx: PEVP_MD_CTX); cdecl;
       class procedure LoadOpenSSL;
     public
       class function Sign(const AInput, AKey: TBytes; AAlg: TRSAAlgorithm): TBytes;
  
positive.code:   PrivKey: pEVP_PKEY;
    rsa: pRSA;
  
    locBIO: pBIO;
    locCtx: PEVP_MD_CTX;
    locSHA: PEVP_MD;
  
  
negative.code: 
  class procedure TRSA.LoadOpenSSL;
  begin
    if FOpenSSLHandle = 0 then
    begin
      if not IdSSLOpenSSLHeaders.Load then
        raise Exception.Create('[RSA] Unable to load OpenSSL DLLs');
  
      if @EVP_DigestVerifyInit = nil then
        raise Exception.Create('[RSA] Please, use OpenSSL 1.0.0. or newer!');
  
      FOpenSSLHandle := LoadLibrary('libeay32.dll');
      if FOpenSSLHandle = 0 then
        raise Exception.Create('[RSA] Unable to load libeay32.dll!');
  
      _PEM_read_bio_RSA_PUBKEY := GetProcAddress(FOpenSSLHandle, 'PEM_read_bio_RSA_PUBKEY');
      if @_PEM_read_bio_RSA_PUBKEY = nil then
        raise Exception.Create('[RSA] Unable to get proc address for ''PEM_read_bio_RSA_PUBKEY''');
  
      _EVP_MD_CTX_create := GetProcAddress(FOpenSSLHandle, 'EVP_MD_CTX_create');
      if @_EVP_MD_CTX_create = nil then
        raise Exception.Create('[RSA] Unable to get proc address for ''EVP_MD_CTX_create''');
  
      _EVP_MD_CTX_destroy := GetProcAddress(FOpenSSLHandle, 'EVP_MD_CTX_destroy');
      if @_EVP_MD_CTX_create = nil then
        raise Exception.Create('[RSA] Unable to get proc address for ''EVP_MD_CTX_destroy''');
    end;
  end;
  
  initialization
      TRSA.FOpenSSLHandle := 0;
      TRSA._PEM_read_bio_RSA_PUBKEY := nil;
      TRSA._EVP_MD_CTX_create := nil;
      TRSA._EVP_MD_CTX_destroy := nil;
  
  end.
  