title: Is this base40 and if so how can I decode it in C#?
body: <p>I have several encoded strings and I need to decode them, my guess is they could be base40 encoding. I really need to decode, but it would be nice to do the encoding as well all in C#.  BTW, I have tried all standard types of decoding before coming to the conclusion that it appears to be base40.</p>
  
  <p>I couldn't find anything about base40 encoding/decoding, I found a lot of encoding information about similar things like base32 and of course base64 so I think it should be possible to do a base40.</p>
  
  <p>Here is an example of the encoded string and the correct decoded value.  I can provide several other examples if needed.  All the string I want to decode are encoded SHA1 hashes.</p>
  
  <p><strong>ENCODED</strong></p>
  
  <p>/KUGOuoESMWYuDb+BTMK1LaGe7k=</p>
  
  <p><strong>DECODED</strong> </p>
  
  <p>0xFCA5063AEA0448C598B836FE05330AD4B6867BB9</p>
  
  <p><strong>UPDATE:</strong>
  Turns out is the binary version of the SHA1 string that is then encoded to base64 which is why I was having trouble decoding it.  I can give credit to Ignacio Vazquez-Abrams because he showed some output showing base64 but didn't explain his answer nor provided a C# example as requested.  So I went and dug deeper thing about what his code was doing in what ever language that was and I came up with the answer I posted with a C# example how to do it.  </p>