Revert "Added as_plaintext flag into Encode for API compatibility"

This reverts commit 267ac34af7a7beaa355a8a3be993bf16fd43ee5d.