Branch: Tag:

2013-12-08

2013-12-08 13:04:51 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Nettle: All narrow strings should now be declared as such.

112:    }       -  /*! @decl string(0..255) hash(string data) +  /*! @decl string(0..255) hash(string(0..255) data)    *!    *! Works as a (faster) shortcut for    *! @expr{State()->update(data)->digest()@}, where State is
121:    *! @seealso    *! @[State()->update()] and @[State()->digest()].    */ -  PIKEFUN string(0..255) hash(string in) +  PIKEFUN string(0..255) hash(string(0..255) in)    optflags OPT_TRY_OPTIMIZE;    {    void *ctx;
245:    }       /* NOTE: This is NOT the MIME base64 table! */ -  static const char b64tab[64] = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; +  static const char b64tab[64] = +  "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";       static inline void b64enc(char *dest, int a, int b, int c, int sz)    {
256:    }    }    -  /*! @decl string(0..127) crypt_hash(string password, string salt, int rounds) +  /*! @decl string(0..127) crypt_hash(string(0..255) password, @ +  *! string(0..255) salt, int rounds)    *!    *! Password hashing function in @[crypt_md5()]-style.    *!
271:    *! @seealso    *! @[crypt_md5()]    */ -  PIKEFUN string(0..127) crypt_hash(string password, string salt, int rounds) +  PIKEFUN string(0..127) crypt_hash(string(0..255) password, +  string(0..255) salt, int rounds)    {    struct pike_string *res;    const struct nettle_hash *meta = THIS->meta;