- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for DecodedLen (0.09 sec)
-
docs/debugging/inspect/utils.go
// Try PEM if block, _ := pem.Decode(priv); block != nil { return x509.ParsePKCS1PrivateKey(block.Bytes) } // Try base 64 dst := make([]byte, base64.StdEncoding.DecodedLen(len(priv))) if n, err := base64.StdEncoding.Decode(dst, priv); err == nil { return x509.ParsePKCS1PrivateKey(dst[:n]) } // Try Raw, return error return x509.ParsePKCS1PrivateKey(priv) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Nov 02 20:36:38 UTC 2022 - 1.4K bytes - Viewed (0) -
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)