Updating implementation to follow latest changes with SecException