Switch between two algorithms

Change-Id: Ib90aec59386fca97b93d5ac9ab0ffc88c8378386
Signed-off-by: Andrey Shamis <lolnik@gmail.com>