Skip to main content
Ctrl+K
Logo image

COMPAS Viewer

  • Introduction
  • Installation
  • Tutorials
    • File Structure
  • Examples
    • Basic Examples
    • Object Examples
    • Color Examples
    • Layout Examples
    • Dynamic Examples
    • Other Examples
  • API Reference
    • compas_viewer.viewer
    • compas_viewer.scene
    • compas_viewer.controller
    • compas_viewer.actions
    • compas_viewer.components
    • compas_viewer.configurations
    • compas_viewer.layout
    • compas_viewer.utilities
  • License
  • Acknowledgements
COMPAS.dev
  • API Reference
  • MenubarConfig
  • MenubarConfig.sha256

MenubarConfig.sha256

MenubarConfig.sha256(as_string=False)[source]

Compute a hash of the data for comparison during version control using the sha256 algorithm.

Parameters:
as_stringbool, optional

If True, return the digest in hexadecimal format rather than as bytes.

Returns:
bytes | str

Examples

>>> from compas.datastructures import Mesh
>>> mesh = Mesh.from_obj(compas.get('faces.obj'))
>>> v1 = mesh.sha256()
>>> v2 = mesh.sha256()
>>> mesh.vertex_attribute(mesh.vertex_sample(1)[0], 'z', 1)
>>> v3 = mesh.sha256()
>>> v1 == v2
True
>>> v2 == v3
False
On this page
  • MenubarConfig.sha256()

© Copyright COMPAS Association.

Created using Sphinx 6.2.1.

Built with the PyData Sphinx Theme 0.13.3.