Skip to content

Latest commit

 

History

History
25 lines (21 loc) · 385 Bytes

README.md

File metadata and controls

25 lines (21 loc) · 385 Bytes

Crypto

SHA256

import SHA256 "mo:core/crypto/SHA256";
import { sum } = "mo:core/crypto/SHA256";

Interface

module {
  type SHA256 = {
    blockSize : () -> Nat;
    checkSum : () -> [Nat8];
    reset : () -> ();
    size : () -> Nat;
    sum : [Nat8] -> [Nat8];
    write : [Nat8] -> ();
  };
  SHA256 : () -> SHA256;
  sum : [Nat8] -> [Nat8];
};