GoogleAuthTOTP 算法的 Java 實(shí)現(xiàn)
GoogleAuth 是一個 Java 服務(wù)端開發(fā)包,實(shí)現(xiàn)了 Time-based One-time Password (TOTP) 算法 RFC 6238.
該項(xiàng)目參考 Google Authenticator, 后者是一個 C 的開源項(xiàng)目。
Maven:
<dependency>
<groupId>com.warrenstrange</groupId>
<artifactId>googleauth</artifactId>
<version>1.1.2</version>
</dependency>
示例代碼:
GoogleAuthenticator gAuth = new GoogleAuthenticator();
final GoogleAuthenticatorKey key = gAuth.createCredentials();
評論
圖片
表情
