Implemented verify() API function.