fn from(sk: SpendingKey) -> Diversifier {
        let mut i = 0u8;

        loop {
            let mut d_bytes = [0u8; 11];
            d_bytes[..].copy_from_slice(&prf_expand(sk.bytes, &[3, i])[..11]);

            if diversify_hash(d_bytes).is_some() {
                break Self(d_bytes);
            }

            assert!(i < 255);

            i += 1;
        }
    }
/// Derives a [_default diversifier_][4.2.2] from a SpendingKey.
///
/// 'For each spending key, there is also a default diversified
/// payment address with a "random-looking" diversifier. This
/// allows an implementation that does not expose diversified
/// addresses as a user-visible feature, to use a default address
/// that cannot be distinguished (without knowledge of the
/// spending key) from one with a random diversifier...'
///
/// [4.2.2]: https://zips.z.cash/protocol/protocol.pdf#saplingkeycomponents
Derives a [_default diversifier_][4.2.2] from a SpendingKey.
'For each spending key, there is also a default diversified
payment address with a "random-looking" diversifier. This
allows an implementation that does not expose diversified
addresses as a user-visible feature, to use a default address
that cannot be distinguished (without knowledge of the
spending key) from one with a random diversifier...'


Derives a [ _default diversifier_ ] [ 4 . 2 . 2 ] from a SpendingKey . ' For each spending key there is also a default diversified payment address with a " random - looking " diversifier . This allows an implementation that does not expose diversified addresses as a user - visible feature to use a default address that cannot be distinguished ( without knowledge of the spending key ) from one with a random diversifier ... '
fn from(sk: SpendingKey) -> Diversifier {
        let mut i = 0u8;
        loop {
            let mut d_bytes = [0u8; 11];
            d_bytes[..].copy_from_slice(&prf_expand(sk.bytes, &[3, i])[..11]);
            if diversify_hash(d_bytes).is_some() {
                break Self(d_bytes);
            }
            assert!(i < 255);
            i += 1;
        }
    }
fn from ( sk : SpendingKey ) -> Diversifier { let mut i = 0u8 ; loop { let mut d_bytes = [ 0u8 ; 11 ] ; d_bytes [ .. ] . copy_from_slice ( & prf_expand ( sk . bytes , & [ 3 , i ] ) [ .. 11 ] ) ; if diversify_hash ( d_bytes ) . is_some ( ) { break Self ( d_bytes ) ; } assert ! ( i 255 ) ; i += 1 ; } }
Derives a [_default diversifier_][4.2.2] from a SpendingKey.
Derives a [ _default diversifier_ ] [ 4 . 2 . 2 ] from a SpendingKey .
sk
SpendingKey