All New

user:thomas gists created by user

title:mygist gists with given title

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

Login


All New Login

All gists

Recently created
Least recently created
Recently updated
Least recently updated

xiushen / Test

0 likes
0 forks
1 files
Last active 1747928423
测试Gist
1 public class OidcClientSecretGenerator {
2 public static String generateClientSecret() throws NoSuchAlgorithmException {
3 // 使用 HmacSHA256 算法生成 256 位密钥
4 KeyGenerator kg = KeyGenerator.getInstance("HmacSHA256");
5 kg.init(256); // 密钥长度需符合安全要求 [[4]](https://example.com/4 )
6 SecretKey secretKey = kg.generateKey();
7 return Base64.getEncoder().encodeToString(secretKey.getEncoded());
8 }
9
10 public static void main(String[] args) {
Newer Older

Powered by Opengist ⋅ Load: 46ms⋅

English
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文