github.com/opentofu/opentofu@v1.7.1/internal/encryption/keyprovider/pbkdf2/config_constants.go (about) 1 // Copyright (c) The OpenTofu Authors 2 // SPDX-License-Identifier: MPL-2.0 3 // Copyright (c) 2023 HashiCorp, Inc. 4 // SPDX-License-Identifier: MPL-2.0 5 6 package pbkdf2 7 8 import ( 9 "crypto/sha256" 10 "crypto/sha512" 11 ) 12 13 const ( 14 SHA256HashFunctionName HashFunctionName = "sha256" 15 SHA512HashFunctionName HashFunctionName = "sha512" 16 DefaultHashFunctionName HashFunctionName = SHA512HashFunctionName 17 ) 18 19 var hashFunctions = map[HashFunctionName]HashFunction{ 20 SHA256HashFunctionName: sha256.New, 21 SHA512HashFunctionName: sha512.New, 22 } 23 24 const ( 25 MinimumIterations int = 200000 26 MinimumPassphraseLength int = 16 27 )