anchor.diff:    SHA256(p,plength,PS);
   end;
   
  -class function TCrypto.DoSha256(const TheMessage: AnsiString): TRawBytes;
  +class function TCrypto.DoSha256(const TheMessage: TRawBytes): TRawBytes;
   Var PS : PAnsiChar;
   begin
     SetLength(Result,32);
     PS := @Result[Low(Result)];
  -  SHA256(PAnsiChar(TheMessage),Length(TheMessage),PS);
  +  SHA256(@TheMessage[Low(TheMessage)],Length(TheMessage),PS);
   end;
   
   { New at Build 2.1.6
     Note: Delphi is slowly when working with Strings (allowing space)... so to
     increase speed we use a String as a pointer, and only increase speed if
     needed. Also the same with functions "GetMem" and "FreeMem" }
  -class procedure TCrypto.DoSha256(const TheMessage: AnsiString; out ResultSha256: TRawBytes);
  +class procedure TCrypto.DoSha256(const TheMessage: TRawBytes; out ResultSha256: TRawBytes);
   Var PS : PAnsiChar;
   begin
     If length(ResultSha256)<>32 then SetLength(ResultSha256,32);
     PS := @ResultSha256[Low(ResultSha256)];
  -  SHA256(PAnsiChar(TheMessage),Length(TheMessage),PS);
  -end;
  -
  -class function TCrypto.ECDSASign(Key: PEC_KEY; const digest: AnsiString): TECDSA_SIG;
  +  SHA256(@TheMessage[Low(TheMessage)],Length(TheMessage),PS);
  +end;
  +
  +class function TCrypto.ECDSASign(Key: PEC_KEY; const digest: TRawBytes): TECDSA_SIG;
   Var PECS : PECDSA_SIG;
     p : PAnsiChar;
     i : Integer;
   begin
  -  PECS := ECDSA_do_sign(PAnsiChar(digest),length(digest),Key);
  +  PECS := ECDSA_do_sign(PAnsiChar(@digest[Low(digest)]),Length(digest),Key);
     Try
       if PECS = Nil then raise ECryptoException.Create('Error signing');
   
  
positive.code:   End;
  end;
  
  class function TCrypto.ECDSAVerify(EC_OpenSSL_NID : Word; PubKey: EC_POINT; const digest: AnsiString; Signature: TECDSA_SIG): Boolean;
  Var PECS : PECDSA_SIG;
    PK : PEC_KEY;
    {$IFDEF OpenSSL10}
  
negative.code: Var p : PAnsiChar;
  begin
    p := BN_bn2hex(EC_KEY_get0_private_key(Key));
    Result := strpas(p);
    OPENSSL_free(p);
  end;
  
  class function TCrypto.ToHexaString(const raw: TRawBytes): AnsiString;
  begin
    Result := raw.ToHexaString;
  end;
  
  class function TCrypto.IsHexString(const AHexString: AnsiString) : boolean;
  