plutus-core-1.54.0.0: Language library for Plutus Core
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusCore.Flat.Endian

Description

Endian utilities

Exported for testing purposes, but not meant to be used outside this package.

Synopsis

Documentation

toBE32Word32Word32 Source #

Convert a 32 bit value in cpu endianess to big endian

>>> toBE32 0xF0F1F2F3 == if isBigEndian then 0xF0F1F2F3 else 0xF3F2F1F0
True

toBE64Word64Word64 Source #

Convert a 64 bit value in cpu endianess to big endian

>>> toBE64 0xF0F1F2F3F4F5F6F7 == if isBigEndian then 0xF0F1F2F3F4F5F6F7 else 0xF7F6F5F4F3F2F1F0
True

toBE16Word16Word16 Source #

Convert a 16 bit value in cpu endianess to big endian

>>> toBE16 0xF0F1 == if isBigEndian then 0xF0F1 else 0xF1F0
True