mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 10:53:34 +00:00
4
vendor/golang.org/x/crypto/bn256/gfp12.go
generated
vendored
4
vendor/golang.org/x/crypto/bn256/gfp12.go
generated
vendored
@ -125,8 +125,8 @@ func (e *gfP12) Mul(a, b *gfP12, pool *bnPool) *gfP12 {
|
||||
}
|
||||
|
||||
func (e *gfP12) MulScalar(a *gfP12, b *gfP6, pool *bnPool) *gfP12 {
|
||||
e.x.Mul(e.x, b, pool)
|
||||
e.y.Mul(e.y, b, pool)
|
||||
e.x.Mul(a.x, b, pool)
|
||||
e.y.Mul(a.y, b, pool)
|
||||
return e
|
||||
}
|
||||
|
||||
|
6
vendor/golang.org/x/crypto/sha3/hashes.go
generated
vendored
6
vendor/golang.org/x/crypto/sha3/hashes.go
generated
vendored
@ -58,6 +58,12 @@ func New512() hash.Hash {
|
||||
// that uses non-standard padding. All other users should use New256 instead.
|
||||
func NewLegacyKeccak256() hash.Hash { return &state{rate: 136, outputLen: 32, dsbyte: 0x01} }
|
||||
|
||||
// NewLegacyKeccak512 creates a new Keccak-512 hash.
|
||||
//
|
||||
// Only use this function if you require compatibility with an existing cryptosystem
|
||||
// that uses non-standard padding. All other users should use New512 instead.
|
||||
func NewLegacyKeccak512() hash.Hash { return &state{rate: 72, outputLen: 64, dsbyte: 0x01} }
|
||||
|
||||
// Sum224 returns the SHA3-224 digest of the data.
|
||||
func Sum224(data []byte) (digest [28]byte) {
|
||||
h := New224()
|
||||
|
6
vendor/golang.org/x/crypto/sha3/sha3_test.go
generated
vendored
6
vendor/golang.org/x/crypto/sha3/sha3_test.go
generated
vendored
@ -44,6 +44,7 @@ var testDigests = map[string]func() hash.Hash{
|
||||
"SHA3-384": New384,
|
||||
"SHA3-512": New512,
|
||||
"Keccak-256": NewLegacyKeccak256,
|
||||
"Keccak-512": NewLegacyKeccak512,
|
||||
"SHAKE128": newHashShake128,
|
||||
"SHAKE256": newHashShake256,
|
||||
}
|
||||
@ -137,6 +138,11 @@ func TestKeccak(t *testing.T) {
|
||||
[]byte("abc"),
|
||||
"4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45",
|
||||
},
|
||||
{
|
||||
NewLegacyKeccak512,
|
||||
[]byte("abc"),
|
||||
"18587dc2ea106b9a1563e32b3312421ca164c7f1f07bc922a9c83d77cea3a1e5d0c69910739025372dc14ac9642629379540c17e2a65b19d77aa511a9d00bb96",
|
||||
},
|
||||
}
|
||||
|
||||
for _, u := range tests {
|
||||
|
Reference in New Issue
Block a user