Converts the given data to a SHA-256 hash and returns it as a hex string.
(data: &[u8])
| 937 | |
| 938 | /// Converts the given data to a SHA-256 hash and returns it as a hex string. |
| 939 | pub fn sha256_hex(data: &[u8]) -> String { |
| 940 | let mut hasher = sha2::Sha256::new(); |
| 941 | |
| 942 | hasher.update(data); |
| 943 | |
| 944 | let result = hasher.finalize(); |
| 945 | |
| 946 | hex::encode(result) |
| 947 | } |
| 948 | |
| 949 | pub fn upload_canister_modules(env: &PocketIc, control_panel_id: Principal, controller: Principal) { |
| 950 | // upload upgrader |