本文整理汇总了Java中javacard.framework.Util.arrayCopy方法的典型用法代码示例。如果您正苦于以下问题:Java Util.arrayCopy方法的具体用法?Java Util.arrayCopy怎么用?Java Util.arrayCopy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javacard.framework.Util
的用法示例。
在下文中一共展示了Util.arrayCopy方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleSetAttestationCert
import javacard.framework.Util; //导入方法依赖的package包/类
private void handleSetAttestationCert(APDU apdu) throws ISOException {
byte[] buffer = apdu.getBuffer();
short len = apdu.setIncomingAndReceive();
short dataOffset = apdu.getOffsetCdata();
short copyOffset = Util.makeShort(buffer[ISO7816.OFFSET_P1], buffer[ISO7816.OFFSET_P2]);
if ((short)(copyOffset + len) > (short)attestationCertificate.length) {
ISOException.throwIt(ISO7816.SW_WRONG_DATA);
}
Util.arrayCopy(buffer, dataOffset, attestationCertificate, copyOffset, len);
if ((short)(copyOffset + len) == (short)attestationCertificate.length) {
attestationCertificateSet = true;
}
}
示例2: generatePrivateKey
import javacard.framework.Util; //导入方法依赖的package包/类
private void generatePrivateKey(byte[] applicationParameter, short applicationParameterOffset, byte[] nonceBuffer, short nonceBufferOffset) {
Util.arrayCopy(applicationParameter, applicationParameterOffset, scratch, (short) 0, (short) 32);
Util.arrayCopy(nonceBuffer, nonceBufferOffset, scratch, (short) 32, (short) 32); // we use only 32 byte of the nonce to avoid that message length gets bigger then blocksize (64 Byte)
drngSeed1.getKey(scratch, (short) 64);
drngSeed2.getKey(scratch, (short) 96);
computeHmacSha256(scratch, (short) 64, (short) 64, scratch, (short) 0, (short) 64, scratch, (short) 0);
}
示例3: getId
import javacard.framework.Util; //导入方法依赖的package包/类
byte getId(byte[] buf, short ofs) {
Util.arrayCopy(id, (short) 0, buf, ofs, idLength);
return idLength;
}
示例4: getUserName
import javacard.framework.Util; //导入方法依赖的package包/类
byte getUserName(byte[] buf, short ofs) {
Util.arrayCopy(username, (short) 0, buf, ofs, userNameLength);
return userNameLength;
}
示例5: getPassword
import javacard.framework.Util; //导入方法依赖的package包/类
byte getPassword(byte[] buf, short ofs) {
Util.arrayCopy(password, (short) 0, buf, ofs, passwordLength);
return passwordLength;
}
示例6: setId
import javacard.framework.Util; //导入方法依赖的package包/类
public void setId(byte[] buf, short ofs, byte len) {
Util.arrayCopy(buf, ofs, id, (short) 0, len);
idLength = len;
}
示例7: setUserName
import javacard.framework.Util; //导入方法依赖的package包/类
public void setUserName(byte[] buf, short ofs, byte len) {
Util.arrayCopy(buf, ofs, username, (short) 0, len);
userNameLength = len;
}
示例8: setPassword
import javacard.framework.Util; //导入方法依赖的package包/类
public void setPassword(byte[] buf, short ofs, byte len) {
Util.arrayCopy(buf, ofs, password, (short) 0, len);
passwordLength = len;
}