pub fn suffix(input: &[u8]) -> String {
    let hash = fnv1a(input) as i64;

    let mut list = [0; 607];
    let mut seed = seed(hash);

    for index in 0..627 {
        seed = seedrand(seed);

        if index >= 20 {
            let mut temp = (seed as i64) << 40;
            seed = seedrand(seed);
            temp ^= (seed as i64) << 20;
            seed = seedrand(seed);
            temp ^= seed as i64;
            temp ^= LOOKUP[index - 20];
            list[index - 20] = temp;
        }
    }

    let as_u64 = list[333].wrapping_add(list[606]) as u64;
    let as_i64 = (as_u64 & (std::i64::MAX as u64)) as i64;
    let as_u32 = (as_i64 >> 31) as u32;

    as_u32.to_string().chars().take(8).collect::<String>()
}
/// Generates the Azure Kubernetes Service (AKS) cluster suffix.
///
/// This method is equivalent to the follow `Go` code extracted from the `aks-engine` project
/// and should produce the same results.
///
/// ```go
/// import (
///     "fmt"
///     "hash/fnv"
///     "math/rand"
/// )
///
/// func suffix(input []byte) string {
///     h := fnv.New64a()
///     h.Write(input)
///     r := rand.New(rand.NewSource(int64(h.Sum64())))
///     return fmt.Sprintf("%08d", r.Uint32())[:8]
/// }
/// ```
Generates the Azure Kubernetes Service (AKS) cluster suffix.
This method is equivalent to the follow `Go` code extracted from the `aks-engine` project
and should produce the same results.




Generates the Azure Kubernetes Service ( AKS ) cluster suffix . This method is equivalent to the follow ` Go ` code extracted from the ` aks - engine ` project and should produce the same results .
pub fn suffix(input: &[u8]) -> String {
    let hash = fnv1a(input) as i64;
    let mut list = [0; 607];
    let mut seed = seed(hash);
    for index in 0..627 {
        seed = seedrand(seed);
        if index >= 20 {
            let mut temp = (seed as i64) << 40;
            seed = seedrand(seed);
            temp ^= (seed as i64) << 20;
            seed = seedrand(seed);
            temp ^= seed as i64;
            temp ^= LOOKUP[index - 20];
            list[index - 20] = temp;
        }
    }
    let as_u64 = list[333].wrapping_add(list[606]) as u64;
    let as_i64 = (as_u64 & (std::i64::MAX as u64)) as i64;
    let as_u32 = (as_i64 >> 31) as u32;
    as_u32.to_string().chars().take(8).collect::<String>()
}
pub fn suffix ( input : & [ u8 ] ) -> String { let hash = fnv1a ( input ) as i64 ; let mut list = [ 0 ; 607 ] ; let mut seed = seed ( hash ) ; for index in 0 .. 627 { seed = seedrand ( seed ) ; if index >= 20 { let mut temp = ( seed as i64 ) << 40 ; seed = seedrand ( seed ) ; temp ^= ( seed as i64 ) << 20 ; seed = seedrand ( seed ) ; temp ^= seed as i64 ; temp ^= LOOKUP [ index - 20 ] ; list [ index - 20 ] = temp ; } } let as_u64 = list [ 333 ] . wrapping_add ( list [ 606 ] ) as u64 ; let as_i64 = ( as_u64 & ( std :: i64 :: MAX as u64 ) ) as i64 ; let as_u32 = ( as_i64 >> 31 ) as u32 ; as_u32 . to_string ( ) . chars ( ) . take ( 8 ) . collect :: < String > ( ) }
Generates the Azure Kubernetes Service (AKS) cluster suffix.
Generates the Azure Kubernetes Service ( AKS ) cluster suffix .
input
&[u8]