On an small audience highly confident web application we are about use CSP to add a level of security. Most parts of the application could be moved to script files and script-src set to 'self' would be sufficient. Some parts however still have to use inline scripts. PHP Session IDs are recreated on a regular basis. We're considering creating a nonce for the remaining cases. Would this code be sufficient for this case?
$nonce = base64_encode(sha1(session_id()));
upon logoff we reset the session id. Would this setup offer a reasonable level of CSP protection?