ui/shared/src/main/java/com/squareup/subzero/shared/SubzeroUtils.java
private static void validateInitWalletInternalCommandRequest(
      InternalCommandRequest request) throws VerificationException {
    if (request.getMasterSeedEncryptionKeyTicketOrThrow().size() >
        Constants.MASTER_SEED_ENCRYPTION_KEY_TICKET_MAX_SIZE) {
      throw new VerificationException(ERROR_MASTER_SEED_ENCRYPTION_KEY_TICKET_SIZE);
    }
    if (request.getPubKeyEncryptionKeyTicketOrThrow().size() > Constants.PUB_KEY_ENCRYPTION_KEY_TICKET_MAX_SIZE) {
      throw new VerificationException(ERROR_PUB_KEY_ENCRYPTION_KEY_TICKET_SIZE);
    }
    if (request.getInitWalletOrThrow().getRandomBytesOrThrow().size() > Constants.RANDOM_BYTES_MAX_SIZE) {
      throw new VerificationException(ERROR_RANDOM_BYTES_SIZE);
    }
  }
/**
   * Verifies size/count limits for InitWallet request proto fields
   * These checks are done to align with limits set in the Codesafe module
   * This method is for internal protos
   * @param request InitWalletRequest to validate
   * @throws VerificationException in the event of a field exceeding a required limit
   */
Verifies size/count limits for InitWallet request proto fields
These checks are done to align with limits set in the Codesafe module
This method is for internal protos
@param request InitWalletRequest to validate
@throws VerificationException in the event of a field exceeding a required limit
Verifies size / count limits for InitWallet request proto fields These checks are done to align with limits set in the Codesafe module This method is for internal protos @param request InitWalletRequest to validate @throws VerificationException in the event of a field exceeding a required limit
private static void validateInitWalletInternalCommandRequest(
      InternalCommandRequest request) throws VerificationException {
    if (request.getMasterSeedEncryptionKeyTicketOrThrow().size() >
        Constants.MASTER_SEED_ENCRYPTION_KEY_TICKET_MAX_SIZE) {
      throw new VerificationException(ERROR_MASTER_SEED_ENCRYPTION_KEY_TICKET_SIZE);
    }
    if (request.getPubKeyEncryptionKeyTicketOrThrow().size() > Constants.PUB_KEY_ENCRYPTION_KEY_TICKET_MAX_SIZE) {
      throw new VerificationException(ERROR_PUB_KEY_ENCRYPTION_KEY_TICKET_SIZE);
    }
    if (request.getInitWalletOrThrow().getRandomBytesOrThrow().size() > Constants.RANDOM_BYTES_MAX_SIZE) {
      throw new VerificationException(ERROR_RANDOM_BYTES_SIZE);
    }
  }
private static void validateInitWalletInternalCommandRequest ( InternalCommandRequest request ) throws VerificationException { if ( request . getMasterSeedEncryptionKeyTicketOrThrow ( ) . size ( ) > Constants . MASTER_SEED_ENCRYPTION_KEY_TICKET_MAX_SIZE ) { throw new VerificationException ( ERROR_MASTER_SEED_ENCRYPTION_KEY_TICKET_SIZE ) ; } if ( request . getPubKeyEncryptionKeyTicketOrThrow ( ) . size ( ) > Constants . PUB_KEY_ENCRYPTION_KEY_TICKET_MAX_SIZE ) { throw new VerificationException ( ERROR_PUB_KEY_ENCRYPTION_KEY_TICKET_SIZE ) ; } if ( request . getInitWalletOrThrow ( ) . getRandomBytesOrThrow ( ) . size ( ) > Constants . RANDOM_BYTES_MAX_SIZE ) { throw new VerificationException ( ERROR_RANDOM_BYTES_SIZE ) ; } }
Verifies size/count limits for InitWallet request proto fields
 These checks are done to align with limits set in the Codesafe module
 This method is for internal protos
 @param request InitWalletRequest to validate
 @throws VerificationException in the event of a field exceeding a required limit
Verifies size / count limits for InitWallet request proto fields These checks are done to align with limits set in the Codesafe module This method is for internal protos @param request InitWalletRequest to validate @throws VerificationException in the event of a field exceeding a required limit