зашифровать текст (C#)

Discussion in 'С/С++, C#, Rust, Swift, Go, Java, Perl, Ruby' started by CheatXX, 17 Feb 2012.

  1. CheatXX

    CheatXX New Member

    Joined:
    8 Jun 2009
    Messages:
    154
    Likes Received:
    2
    Reputations:
    0
    подскажите как перевести етот код с php на C#?

    base64_encode(pack("H*", sha1(utf8_encode(TEXT))));
     
    #1 CheatXX, 17 Feb 2012
    Last edited: 17 Feb 2012
  2. Fox_NICK

    Fox_NICK Elder - Старейшина

    Joined:
    10 Jan 2007
    Messages:
    45
    Likes Received:
    5
    Reputations:
    0
    Найдешь все что нужно:
    http://msdn.microsoft.com/en-us/library/system.security.cryptography.sha1.aspx

    , а лучше учись поиском пользоваться!
     
  3. CheatXX

    CheatXX New Member

    Joined:
    8 Jun 2009
    Messages:
    154
    Likes Received:
    2
    Reputations:
    0
    А аналог pack?
     
  4. seosimf

    seosimf Member

    Joined:
    3 Mar 2011
    Messages:
    271
    Likes Received:
    44
    Reputations:
    6
    Раз, читаем что такое "H*" и затем два.