Home | History | Annotate | Download | only in wpa_supplicant

Lines Matching full:len

132 void crypto_hash_update(struct crypto_hash *ctx, const u8 *data, size_t len)
140 MD5Update(&ctx->u.md5, data, len);
144 SHA1Update(&ctx->u.sha1, data, len);
150 int crypto_hash_finish(struct crypto_hash *ctx, u8 *mac, size_t *len)
158 if (mac == NULL || len == NULL) {
165 if (*len < 16) {
166 *len = 16;
170 *len = 16;
174 if (*len < 20) {
175 *len = 20;
179 *len = 20;
183 if (*len < 16) {
184 *len = 16;
188 *len = 16;
203 if (*len < 20) {
204 *len = 20;
208 *len = 20;
310 u8 *crypt, size_t len)
317 os_memcpy(crypt, plain, len);
319 ctx->u.rc4.used_bytes, crypt, len);
320 ctx->u.rc4.used_bytes += len;
323 if (len % ctx->u.aes.block_size)
325 blocks = len / ctx->u.aes.block_size;
338 if (len % 8)
340 blocks = len / 8;
360 u8 *plain, size_t len)
368 os_memcpy(plain, crypt, len);
370 ctx->u.rc4.used_bytes, plain, len);
371 ctx->u.rc4.used_bytes += len;
374 if (len % ctx->u.aes.block_size)
376 blocks = len / ctx->u.aes.block_size;
388 if (len % 8)
390 blocks = len / 8;
430 struct crypto_public_key * crypto_public_key_import(const u8 *key, size_t len)
433 crypto_rsa_import_public_key(key, len);
438 size_t len)
441 crypto_rsa_import_private_key(key, len);
446 size_t len)
567 size_t len;
570 len = *plain_len;
571 if (crypto_rsa_exptmod(crypt, crypt_len, plain, &len,
584 if (len < 3 + 8 + 16 /* min hash len */ ||
592 while (pos < plain + len && *pos == 0xff)
601 if (pos + 16 /* min hash len */ >= plain + len || *pos != 0x00) {
607 len -= pos - plain;
610 os_memmove(plain, pos, len);
611 *plain_len = len;