Lines Matching refs:threads

54 func Key(password, salt []byte, time, memory uint32, threads uint8, keyLen uint32) []byte {
55 return deriveKey(argon2i, password, salt, nil, nil, time, memory, threads, keyLen)
74 func Key2d(password, salt []byte, time, memory uint32, threads uint8, keyLen uint32) []byte {
75 return deriveKey(argon2d, password, salt, nil, nil, time, memory, threads, keyLen)
94 func Key2id(password, salt []byte, time, memory uint32, threads uint8, keyLen uint32) []byte {
95 return deriveKey(argon2id, password, salt, nil, nil, time, memory, threads, keyLen)
98 func deriveKey(mode int, password, salt, secret, data []byte, time, memory uint32, threads uint8, k…
102 if threads < 1 {
105 h0 := initHash(password, salt, secret, data, time, memory, uint32(threads), keyLen, mode)
107 memory = memory / (syncPoints * uint32(threads)) * (syncPoints * uint32(threads))
108 if memory < 2*syncPoints*uint32(threads) {
109 memory = 2 * syncPoints * uint32(threads)
111 B := initBlocks(&h0, memory, uint32(threads))
112 processBlocks(B, time, memory, uint32(threads), mode)
113 return extractKey(B, memory, uint32(threads), keyLen)
123 func initHash(password, salt, key, data []byte, time, memory, threads, keyLen uint32, mode int) [bl… argument
131 binary.LittleEndian.PutUint32(params[0:4], threads)
154 func initBlocks(h0 *[blake2b.Size + 8]byte, memory, threads uint32) []block {
157 for lane := uint32(0); lane < threads; lane++ {
158 j := lane * (memory / threads)
176 func processBlocks(B []block, time, memory, threads uint32, mode int) {
177 lanes := memory / threads
218 newOffset := indexAlpha(random, lanes, segments, threads, n, slice, lane, index)
228 for lane := uint32(0); lane < threads; lane++ {
238 func extractKey(B []block, memory, threads, keyLen uint32) []byte { argument
239 lanes := memory / threads
240 for lane := uint32(0); lane < threads-1; lane++ {
255 func indexAlpha(rand uint64, lanes, segments, threads, n, slice, lane, index uint32) uint32 { argument
256 refLane := uint32(rand>>32) % threads