Share via

CsharpShell app

Trojanx6 21 Reputation points
2022-09-08T18:26:40.587+00:00

I'm using c# Shell .Net from an Android phone and I'm getting the error "not defined" when encrypting with sha256?

Error:
Name 'ComputeSha256Hash' does not exist in current context

Source Code:
using System;
using System.Text;
using System.Security.Cryptography;

namespace sha{
class progam{
static void Main(string[] args){
Console.WriteLine("veri giriniz: ");
string a = Console.ReadLine();
Console.WriteLine("Ham veri:{0}",a);
string dt = ComputeSha256Hash(a);
Console.WriteLine("hash:",dt);
}
}
}

Developer technologies | C++
Developer technologies | C++

A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.

0 comments No comments

Answer accepted by question author

Viorel 127K Reputation points
2022-09-08T19:16:24.823+00:00

It seems that ComputeSha256Hash is a sample function, which can be found on some sites (https://www.bing.com/search?q=ComputeSha256Hash). Add it to your code.

Was this answer helpful?


1 additional answer

Sort by: Most helpful
  1. Michael Taylor 61,226 Reputation points
    2022-09-08T19:16:14.207+00:00

    If this is all your code then you haven't defined the ComputeSha256Hash function. That is the compiler error. You need to define that method. What it looks like is beyond me as I don't know what sample you're talking about.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.