Mercurial > hg > ucis.core
comparison NaCl/crypto_hash/sha512.cs @ 71:7e9d1cfcc562
NaCl: added ed25519 public key message signing implementation
author | Ivo Smits <Ivo@UCIS.nl> |
---|---|
date | Fri, 01 Nov 2013 00:07:36 +0100 |
parents | c873e3dd73fe |
children | b7d981ccd434 |
comparison
equal
deleted
inserted
replaced
70:c22be6c412de | 71:7e9d1cfcc562 |
---|---|
13 0x9b,0x05,0x68,0x8c,0x2b,0x3e,0x6c,0x1f, | 13 0x9b,0x05,0x68,0x8c,0x2b,0x3e,0x6c,0x1f, |
14 0x1f,0x83,0xd9,0xab,0xfb,0x41,0xbd,0x6b, | 14 0x1f,0x83,0xd9,0xab,0xfb,0x41,0xbd,0x6b, |
15 0x5b,0xe0,0xcd,0x19,0x13,0x7e,0x21,0x79 | 15 0x5b,0xe0,0xcd,0x19,0x13,0x7e,0x21,0x79 |
16 };*/ | 16 };*/ |
17 | 17 |
18 public static unsafe void crypto_hash(Byte[] outv, Byte[] inv, int inlen) { | |
19 if (outv.Length < 64) throw new ArgumentException("outv.Length < 64"); | |
20 if (inv.Length < inlen) throw new ArgumentException("inv.Length < inlen"); | |
21 fixed (Byte* outp = outv, inp = inv) crypto_hash(outp, inp, (UInt64)inlen); | |
22 } | |
18 public static unsafe void crypto_hash(Byte* outp, Byte* inp, UInt64 inlen) { | 23 public static unsafe void crypto_hash(Byte* outp, Byte* inp, UInt64 inlen) { |
19 // Byte[] h = new Byte[64]; | 24 // Byte[] h = new Byte[64]; |
20 Byte[] padded = new Byte[256]; | 25 Byte[] padded = new Byte[256]; |
21 UInt64 i; | 26 UInt64 i; |
22 UInt64 bytes = inlen; | 27 UInt64 bytes = inlen; |