Files
se-algo/Src/com/cscn/RandomGenerator.java
2025-09-09 16:06:49 +08:00

23 lines
661 B
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//package com.cscn;
//
//import javacard.security.RandomData;
//
//public class RandomGenerator {
// private final RandomData random;
//
// //构造函数
// public RandomGenerator()
// {
// //类当中有getInstance的都要先调用这个函数获取对象实例才能使用其他方法不然6F00
// random = RandomData.getInstance(RandomData.ALG_SECURE_RANDOM);
// }
//
// //产生length长度的随机数并返回
// public final byte[] GenrateSecureRand(short length, byte[] out)
// {
// //生成4bit的随机数
// random.generateData(out, (short)0, (short)length);
// return out;
// }
//}