Page 1 of 1

Parameters : byte [] buffer and offset

Posted: Wed Oct 12, 2016 5:01 am
by afrascoi
Could anybody help me understand the arguments to the functions getModulus(byte [] buffer, short offset) and getExponent(byte [] buffer, short offset) well. What is byte [] buffer and offset?

Re: Parameters : byte [] buffer and offset

Posted: Thu Oct 13, 2016 4:46 am
by Pf6KINE
buffer is where to output the data, offset is where to start in the buffer.

Code: Select all

byte[] buffer = adpu.getBuffer();
short offset = (short)0;

offset += key.getModulus(buffer, offset);
offset += key.getExponent(buffer, offset);