Cohomology of oriented algebras