Function encodeEncMethod() was added

Signed-off-by: Bleska <blecha.jiri@gmail.com>