Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for DecodedLen (0.06 sec)

  1. internal/auth/credentials.go

    	}
    	if length <= 0 {
    		length = secretKeyMaxLen
    	}
    	if length < secretKeyMinLen {
    		return "", errors.New("auth: secret key length is too short")
    	}
    
    	key := make([]byte, base64.RawStdEncoding.DecodedLen(length))
    	if _, err := io.ReadFull(random, key); err != nil {
    		return "", err
    	}
    
    	s := base64.RawStdEncoding.EncodeToString(key)
    	return strings.ReplaceAll(s, "/", "+"), nil
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue May 28 17:14:16 UTC 2024
    - 12K bytes
    - Viewed (0)
Back to top