I am trying to integrate my flutter app with a payment api (called iyzico). Following the steps with http plugin and cyrpto plugin doesn't produce the desired solution. I wanted to ask you where is my mistake. I can not obtain the encodedstring property as desired. There is a php code to understand it well. First we need to hash a string with following steps.
Example on php: $string = “some string”;
then we need to hash string with SHA1 (result should be in a raw binary format)
Example on php: $hashedString= sha1($string, true);
My solution like this up to now;
var string = utf8.encode("somestring");
var hashedstring = sha1.convert(string);
Last step is that encode the hashed string to BASE64 format;
Example on php: $encodedString = base_64_encode($hashedString);
My solution was;
Codec<String, String> stringToBase64 = utf8.fuse(base64);
String encodedString = stringToBase64.encode(hashedstring.toString());
I don't know cryptology and crypto plugin very well and I think that ı could not get the value proper format. Thanks for now