github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/hash/fnv/fnv.go (about)

     1  // Copyright 2011 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // パッケージfnvは、 Glenn Fowler、Landon Curt Noll、およびPhong Voによって作成された
     6  // FNV-1およびFNV-1aという非暗号化ハッシュ関数を実装しています。
     7  // 詳細は、以下を参照してください。
     8  // https://en.wikipedia.org/wiki/Fowler-Noll-Vo_hash_function.
     9  //
    10  // このパッケージによって返されるすべてのhash.Hashの実装も、
    11  // encoding.BinaryMarshalerとencoding.BinaryUnmarshalerを実装しています。
    12  // これにより、ハッシュの内部状態をマーシャリングおよびアンマーシャリングすることができます。
    13  package fnv
    14  
    15  import (
    16  	"github.com/shogo82148/std/hash"
    17  )
    18  
    19  // New32は新しい32ビットFNV-1 [hash.Hash] を返します。
    20  // そのSumメソッドは値をビッグエンディアンのバイト順で配置します。
    21  func New32() hash.Hash32
    22  
    23  // New32aは32ビットのFNV-1a [hash.Hash] を新たに作成します。
    24  // そのSumメソッドは値をビッグエンディアンバイト順で表示します。
    25  func New32a() hash.Hash32
    26  
    27  // New64は新しい64ビットのFNV-1 [hash.Hash] を返します。
    28  // そのSumメソッドは値をビッグエンディアンのバイトオーダーで配置します。
    29  func New64() hash.Hash64
    30  
    31  // New64a は新しい64ビットのFNV-1a [hash.Hash] を返します。
    32  // そのSumメソッドは値をビッグエンディアンのバイト順序で配置します。
    33  func New64a() hash.Hash64
    34  
    35  // New128は新しい128ビットのFNV-1 [hash.Hash] を返します。
    36  // Sumメソッドは値をビッグエンディアンのバイトオーダーで配置します。
    37  func New128() hash.Hash
    38  
    39  // New128aは新しい128ビットのFNV-1a [hash.Hash] を返します。
    40  // そのSumメソッドは値をビッグエンディアンのバイト順で配置します。
    41  func New128a() hash.Hash