* }
*
*/
try {
TLV t = new TLV(data, 0);
t = t.child; // AlgorithmIdentifier
if (! Utils.byteMatch(data, t.child.valueOffset, t.child.length,
RSA_OID, 0, RSA_OID.length)) {
throw new InvalidKeySpecException(
"Invalid algorithm identifier");
}
t = t.next; // subjectPublicKey
/*
* RSAPublicKey ::= SEQUENCE {
* modulus INTEGER, -- n
* publicExponent INTEGER -- e --
* }
*/
// the first byte of value in BIT STRING is the number of
// unused bits
t = new TLV(data, t.valueOffset + 1);
t = t.child; // modulus
int offset = t.valueOffset;
int len = t.length;