3
I’m consuming a webservice of nfse (electronic service invoice), and the nfse batch receipt function, there is that the password is encrypted using the algorithm SHA1.
The Handbook exemplifies this:
The password: "1234", should look like this: cRDtpNCeBiql5KOQsKVyrA0sAiA=
I even used the code below:
public string SenhaHash(senha){
var hash = new SHA1CryptoServiceProvider();
var senhaBytes = Encoding.Default.GetBytes(senha);
var senhaHash = hash.ComputeHash(senhaBytes );
return senhaHash;
}
However the value returned is a byte array, which has nothing to do with the value I should arrive at.
Possible duplicate of Security key in Asp.net mvc
– Barbetta