Community Open Day 沖縄

  • Published on
    20-Jul-2015

  • View
    2.516

  • Download
    0

Embed Size (px)

Transcript

  • TouchDevelop tmyt COD 13/5/11

  • about me tmyt

    Xamarin 2.0

    : C++, C#, Delphi, ZSH Twitter: @tmyt Github: tmyt

  • TouchDevelop TouchDevelop

    bit

  • Touch develop is

    Microsoft Reserch

    OK

  • DEMO

  • TouchDevelop

    CISC

    Store AppsExport

  • TouchDevelop

    IntChar 53bit

  • TouchDevelopOAuth

  • TouchDevelopOAuth

  • OAuth

    HMAC-SHA1 Authorization: OAuth

    UTF-8

    Epoch Time

  • TouchDevelop

    HMAC-SHA1 SHA1

    HMAC

    Authorization: OAuth

    UTF-8

    Epoch Time

  • TouchDevelop

    SHA1

    HMAC

    UTF-8 UTF-16

    Epoch Time DateTime

  • OAuth

    1. Epoch Time 2.

    3. SHA1

    4. HMAC

    5. UTF-16 UTF-8

    6. OAuth

  • Chapter.I Epoch Time

  • Epoch Time

    UNIX 197011

    UTC

  • TouchDevelop

    TouchDevelop JavaScriptDate

    Epoch Time

  • Epoch Time

    1. UTC 2. 1970

    3. 36400+0

    TouchDevelop

    1

  • Chapter.II

  • 15(10) AND 20(10) = 4(10) 15(10) OR 20(10) = 31(10) 15(10) XOR 20(10) = 27(10)

    C

  • 2 2

    List ToBinary(int n) { var b = new List(); while (n != 0) {

    b.Add(n % 2); n /= 2;

    } return b.Reverse().Take(32).ToList();

    }

  • AND, OR, XOR, NOT

    SHA1

    30

  • Chapter.III SHA1

  • SHA1

    Secure Hash Algorithm SHA

    160bit

    SHA1NIST2010Deprecated SHA256

  • SHA1

    64

    8bit StepA, B, C, D4

    32bit5160bit

  • TouchDevelop

    AND, OR, XOR, SHR, SHL

    1610

    33bit TouchDevelop53bit 4294967295(0xFFFFFFFF)AND

  • Chapter.IV HMAC

  • HMAC

    / /

    SHA1

  • HMAC-SHA1

    HMACSHA1

    0x5cXOR 0x36XOR MAC

  • TouchDevelop

    SHA1

  • Chapter.V UTF-8

  • UTF-8

    UTF-8 TouchDevelopUTF-16

    OAuthUTF-8

    UTF-8

  • TouchDevelopUTF-16 UTF-8INT

    weburl encode UTF-16INT

  • UTF-16UTF-8

    UTF-8 UTF-16 void to_u8(int c) { if(c < 128) chars.Add(c); else { if(c < 2048) chars.Add(((c >> 6) & 31) | 192); else { chars.Add((c >> 12) | 224); chars.Add(((c >> 6) & 63) | 128); } chars.Add((c & 63) | 128); } }

  • Chapter.VI OAuth

  • OAuth

    Credential

  • OAuth

    ConsumerProvider ConsumerURL

    UserURL VerifierConsumer

    ConsumerVerifierProvider

    ProviderConsumer

  • OAuth C++, Java, C#, Objective-C, PHP, Perl, Ruby,

    OAuth

    TouchDevelop

  • TouchDevelop

    OAuth HMAC-SHA1 Epoch Time UTF-8

    TouchDevelop

  • DEMO

  • TouchDevelop TouchDevelop

    C

Recommended

View more >