AndroidでOAuthノンスを生成するには、試しました-
byte[] nonce = new byte[16];
try {
rand = SecureRandom.getInstance("SHA1PRNG");
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
}
String oauth_nonce = rand.toString();
Log.d("nonce value", oauth_nonce);
それは次のようなものを与えます-java.security.SecureRandom@58957gy8
これはノンスを生成する正しい方法ですか? いいえの場合、正しい方法を提案できますか?