You need to hash the signature scheme flag byte concatenated with the public key bytes using the BLAKE2b hashing function. The Sui address should be a 32-byte hash. The BLAKE2b hashing function is available in the sui lib. You can find a Rust example of this here