INNER CODE UNIT · Go

cipherKeyHash2

pilinux/gorest · config/config.go:393

		cipherKeyHash2 := sha256.Sum256([]byte(cipherKey)) // sha2-256
		cipherKeyHash3 := sha3.Sum256(cipherKeyHash2[:])   // sha3-256
		securityConfig.CipherKey = cipherKeyHash3[:]

	}

	// config for blake2b hashing
	blake2bSec := strings.TrimSpace(os.Getenv("BLAKE2B_SECRET"))
	if blake2bSec == "" {
		securityConfig.Blake2bSec = nil
	} else {
		securityConfig.Blake2bSec = []byte(blake2bSec)
	}

	// Email verification and password recovery
	securityConfig.VerifyEmail = false
	securityConfig.RecoverPass = false
	if strings.ToLower(strings.TrimSpace(os.Getenv("VERIFY_EMAIL"))) == Activated {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…