fvm_shared 4.8.2

Filecoin Virtual Machine shared types and functions
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright 2021-2023 Protocol Labs
// SPDX-License-Identifier: Apache-2.0, MIT
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
#[repr(u64)]
pub enum SupportedHashes {
    Sha2_256 = 0x12,
    Blake2b256 = 0xb220,
    Blake2b512 = 0xb240,
    Keccak256 = 0x1b,
    Ripemd160 = 0x1053,
}

impl From<SupportedHashes> for u64 {
    fn from(value: SupportedHashes) -> Self {
        value as Self
    }
}