DA.Crypto.Text
Functions for working with Crypto builtins. For example, as used to implement CCTP functionality.Module Snapshot
Lifecycle
Stable.
Notices
Status:
active
Introduced in: 3.4.9
Removed in: -
Warnings: 0
Deprecations: 0
Deprecated since: -Data Types
type BytesHex = Text
type PublicKeyHex = Text
A DER formatted public key to be used for ECDSA signature verification
type SignatureHex = Text
A DER formatted SECP256K1 signature
Typeclasses
class HasToHex a
Methods:
toHex : a -> BytesHexConverts a typed data value into a hex encoded string.
instance HasToHex Partyinstance HasToHex Intinstance HasToHex Text
class HasFromHex a
Methods:
fromHex : BytesHex -> aConverts a hex encoded string into a typed data value.
instance HasFromHex (Optional Party)instance HasFromHex (Optional Int)instance HasFromHex (Optional Text)
Functions
isHex
isHex is True if t is not empty and consists only of
hex or hexadecimal characters.
sha256
Text, and returns it in its hex-encoded
form. The hex encoding uses lowercase letters.
keccak256
Text, and returns it in its hex-encoded
form. The hex encoding uses lowercase letters.