Lines Matching full:plain
100 int aes_encrypt(void *ctx, const u8 *plain, u8 *crypt)
103 return aes_ecb_encrypt(plain, crypt, skey) == CRYPT_OK ? 0 : -1;
129 int aes_decrypt(void *ctx, const u8 *crypt, u8 *plain)
132 return aes_ecb_encrypt(plain, (u8 *) crypt, skey) == CRYPT_OK ? 0 : -1;
354 int crypto_cipher_encrypt(struct crypto_cipher *ctx, const u8 *plain,
360 if (plain != crypt)
361 os_memcpy(crypt, plain, len);
368 res = cbc_encrypt(plain, crypt, len, &ctx->u.cbc);
379 u8 *plain, size_t len)
384 if (plain != crypt)
385 os_memcpy(plain, crypt, len);
387 ctx->u.rc4.used_bytes, plain, len);
392 res = cbc_decrypt(crypt, plain, len, &ctx->u.cbc);
617 u8 *plain, size_t *plain_len)
624 res = rsa_exptmod(crypt, crypt_len, plain, &len, PK_PUBLIC,
642 plain[0] != 0x00 || plain[1] != 0x01 || plain[2] != 0xff) {
648 pos = plain + 3;
649 while (pos < plain + len && *pos == 0xff)
651 if (pos - plain - 2 < 8) {
658 if (pos + 16 /* min hash len */ >= plain + len || *pos != 0x00) {
664 len -= pos - plain;
667 os_memmove(plain, pos, len);