/** * Validates an encrypted challenge as defined in the protocol, and returns the byte array * that corresponds to the actual challenge data. */ private byte[] validateChallenge(byte[] nonce, byte[] encryptedChallenge) throws GeneralSecurityException { byte[] challenge = decrypt(encryptedChallenge); checkSubArray(appId, challenge, 0); checkSubArray(nonce, challenge, appId.length); return Arrays.copyOfRange(challenge, appId.length + nonce.length, challenge.length); }
/** * Validates an encrypted challenge as defined in the protocol, and returns the byte array * that corresponds to the actual challenge data. */ private byte[] validateChallenge(byte[] nonce, byte[] encryptedChallenge) throws GeneralSecurityException { byte[] challenge = decrypt(encryptedChallenge); checkSubArray(appId, challenge, 0); checkSubArray(nonce, challenge, appId.length); return Arrays.copyOfRange(challenge, appId.length + nonce.length, challenge.length); }
/** * Validates an encrypted challenge as defined in the protocol, and returns the byte array * that corresponds to the actual challenge data. */ private byte[] validateChallenge(byte[] nonce, byte[] encryptedChallenge) throws GeneralSecurityException { byte[] challenge = decrypt(encryptedChallenge); checkSubArray(appId, challenge, 0); checkSubArray(nonce, challenge, appId.length); return Arrays.copyOfRange(challenge, appId.length + nonce.length, challenge.length); }