일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- otpkey
- 앨범북
- WebAuthn
- OTP
- SwiftUI
- apple
- albumbook
- openssl
- 안드로이드
- SSL
- 앱리소스
- MFA
- Android
- FIDO2
- appres
- Nodejs
- css
- git
- fido
- MYSQL
- 인증
- 앱스토어
- Xcode
- MSYS2
- SWIFT
- OSX
- 2FA
- 애플
- kmip
- SSH
Archives
- Today
- Total
인디노트
Linux 계열의 OS 에서 랜덤하게 UUID 생성하는 간단한 방법 본문
public String convertStreamToString(InputStream is) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(is));
StringBuilder sb = new StringBuilder();
String line = null;
while ((line = reader.readLine()) != null) {
sb.append(line).append("\n");
}
reader.close();
return sb.toString();
}
public String getStringFromFile (String filePath) throws Exception {
File fl = new File(filePath);
FileInputStream fin = new FileInputStream(fl);
String ret = convertStreamToString(fin);
//Make sure you close all streams.
fin.close();
return ret;
}
try {
String uuid = getStringFromFile("/proc/sys/kernel/random/uuid");
Log.d("TAG", ">>> uuid:" + uuid);
} catch (Exception e) {
e.printStackTrace();
}
반응형
'인증기술 > 보안기술' 카테고리의 다른 글
JSOTP KGY 버전 (0) | 2022.12.02 |
---|---|
KMIP4J - Open source implementation of Key Management Interoperability Protocol (0) | 2022.04.18 |
쉽게 설명해 놓은 암호학 관련 사이트 (0) | 2021.08.04 |
Triple DES (트리플 DES) (0) | 2021.08.04 |
KMIP 에 대한 내용 (0) | 2021.07.14 |
Comments